• You need to specify the remote server name. The code you are using is trying to connect to the named instance MYSQLSERVER2008 on the local host "sqlcmd -S .\MYSQLSERVER2008". It should look like this "sqlcmd -S RemoteServer\MYSQLSERVER2008"