Wednesday, March 21, 2012

Question about Instance name on Sqlserver 2005 and sqlcmd

Hello,

I am using sqlcmd for SQL server 2005. I install sql2005 with default instance name. It should be MSSQLSERVER.

However, when using sqlcmd, like sqlcmd -S (local)\MSSQLSERVER, it always aborts and suggests a wrong connection string.

I try to find any instance name under servername, but I can't find a command argument with sqlcmd.

So how can I solve the connection string problem? I can connect to the server using "sqlcmd -s (local)" though.

Or, how can I find the instance name of the server? Or maybe any gramma error using sqlcmd to access instance name?

Thanks for your any inputs.

Regards,

Aaron

When you install your first SQL Server in a box you have the option of making it a default instance or named instance and any installation after that must be named instance. And why sqlcmd is not working I don't know but long time SQL Server users stay away from connecting to SQL Server through dos prompt except in emergency. Hope this helps.

No comments:

Post a Comment