April 21, 2010 at 5:23 am
I tried connecting to my sql instance using sqlcmd, but it gives me an error: Login failed for the user xyz.
But I could connect to the same instance using SSMS. Can someone correct if I'm doing it wrong?
April 21, 2010 at 5:27 am
I was actually trying to connect to a named instance. How could I connect to a new instance using sqlcmd?
April 21, 2010 at 5:32 am
try
sqlcmd -Shostname\instancename -Uuser_name -Ppassword
Regards,
MShenel
April 21, 2010 at 5:41 am
Thank you. i'm able to connect now but I'm not able to run any queries.
I'm trying to run
Use AdventureWorks
Select Title From person.contact
It gives me an error saying that "Invalid object name 'person.contact'".
Any help?
April 21, 2010 at 5:53 am
Hey there, can you give us the complete command u are trying to execute?
April 21, 2010 at 7:03 am
Since we're not sitting at your desk, you really need to supply us with the full command that you're trying to run. Without it, there's no way for us to know what you're typing that's wrong.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply