May 27, 2010 at 3:11 am
Hi,
i try to execute this command at the cmd level:
sqlcmd -S computername
i receive the following error:
invalid comand line arg[2]: '-S'
My instance name the name of my computer.
Why does this fails?
May 27, 2010 at 3:49 am
It as any thing to do with the fact that i have a SQL Server 2000 named instance on the same box?
I can connect using osql, but can not connect using sqlcmd...
osql was finished in SQL Server 2005, correct?
May 27, 2010 at 1:02 pm
Use--> sqlcmd -Sservername
May 28, 2010 at 1:08 am
It does not work...
Maybe it's because i have my default instance in SQL Server 2005 and my named instance in SQL Server 2000.
Maybe i have to change the order as the instances are installed and put the default instance as SQL Server 2000.
What do you think?
I can connect to SQL Server 2005 using oSQL instead of sqlcmd, isn't this strange?
August 23, 2010 at 1:45 am
Try
sqlcmd -Sservername\instancename
😎
August 23, 2010 at 2:18 am
Can you supply the servername and the instance name if it is not the default instance on the server. This will help us format the SQLCMD parameters you should be using.
Generally when I have used it is has been:
sqlcmd -H<Host name if on different machine> -S<SQL server name\instance name> -U<username if needed> -P<password> -E -i<input file for execution> -o<output file for results>
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply