SQL Server Network Interfaces: Connection String Invalid [87]

When I run this from cmd on my instance of SQL Server 2008:

sqlcmd -U sa -S mymachinen_name\MSSQLSERVER 

(where MSSQLSERVER is my instance name)

I get a request for a password, and after that I get the following:

Password:

HResult 0x57, Level 16, State 1 SQL Server Network Interfaces: The connection string is not valid [87].

Sqlcmd: Error: Microsoft SQL Server 10.0 native client: a network-related or specific instance error occurred while establishing a connection to SQL Server. Server not found or unavailable. Verify that the instance name is correct and if SQL Server is configured to allow remote connections. For more information, see SQL Server Books Online.

Sqlcmd: Error: Microsoft SQL Server Native Client 10.0: Logon timed out.

I have the SQL Server Browser service running, and I can also log in through Management Studio with Windows Authentication.

This article is also found in KB , but this is for SQL Server 2005/2000.

+5
source share
2 answers

Typically, the MSSQLSERVER service is the default unnamed instance service.

So try the following:

 sqlcmd -U sa -S mymachine_name 

(without specifying the instance name - only the machine name)

+12
source

It is installed on the installation, by default not. Try logging in without a username

0
source

Source: https://habr.com/ru/post/1213915/


All Articles