Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Sqlcmd

Author  Topic 

satheesh
Posting Yak Master

152 Posts

Posted - 2011-05-23 : 11:29:01
Dear All,

I try to execute c:\>sqlcmd -s MYSQLSERVER\INSTANCENAME -i c:\myquery.sql

I got this error

HResult 0X57,level 16,State 1
SQL Network Interfaces:Connection string is not valid [87]
Sqlcmd: Error:Microsoft SQL server Native Client 10.0 :A network related or instance-specific error
has occured while establishing a connection to sql server.
Server not found or not accessible.Check if instance name is correct and if sql server is configured toallow remote connection.For more information see SQL server Books online..
Sqlcmd:Error Microsoft SQL server native client 10.0:login timeout expired.

How to resolve this issue.Any help would be highly apprreciate.Thanks in advance.

Regards,
SG

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-05-23 : 11:31:43
Try with MYSQLSERVER,PORTNUMBER.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2011-05-23 : 11:43:02
1)Can you confirm you have the right instance?
2)Use -S (in UPPER CASE)

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page
   

- Advertisement -