|
|
|
Say Hey Kid
      
Group: General Forum Members
Last Login: Tuesday, May 07, 2013 6:56 AM
Points: 679,
Visits: 953
|
|
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?
|
|
|
|
|
Say Hey Kid
      
Group: General Forum Members
Last Login: Tuesday, May 07, 2013 6:56 AM
Points: 679,
Visits: 953
|
|
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?
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Friday, April 26, 2013 6:53 AM
Points: 1,654,
Visits: 8,562
|
|
Use--> sqlcmd -Sservername
http://syntaxhelp.com/SQLServer/SQLCMD
|
|
|
|
|
Say Hey Kid
      
Group: General Forum Members
Last Login: Tuesday, May 07, 2013 6:56 AM
Points: 679,
Visits: 953
|
|
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?
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Yesterday @ 3:08 AM
Points: 205,
Visits: 261
|
|
Try sqlcmd -Sservername\instancename
We are the pilgrims, master. We shall go always, a little further.
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Sunday, April 21, 2013 2:10 PM
Points: 26,
Visits: 311
|
|
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>
|
|
|
|