SQL Server Network Interfaces: Connection string is not valid [87]

前端 未结 3 2400
伪装坚强ぢ
伪装坚强ぢ 2020-12-19 08:08

When I am running this from cmd on my SQL Server 2008 instance:

sqlcmd -U sa -S mymachinen_name\\MSSQLSERVER

(where MSSQLSERVER

相关标签:
3条回答
  • 2020-12-19 08:54

    Typically, the MSSQLSERVER service is the service of a un-named default instance.

    Therefore, try this:

    sqlcmd -U sa -S mymachine_name
    

    (without specifying any instance name - just the machine name)

    0 讨论(0)
  • 2020-12-19 08:57

    I encountered this error trying to connect to the server through Jenkins and resolved it this way:

    sqlcmd  -e -S "SERVER_NAME,PORT_NUMBER" -U %USER% -P %PASSWORD% -i "D:\\test.sql"
    
    0 讨论(0)
  • 2020-12-19 09:07

    It is set on installation, there is no default. Try to log on without a username

    0 讨论(0)
提交回复
热议问题