SQL Server 2008 in single-user mode does not allow connections

I don’t know the SA password, so I restarted the instance of the standard version of SQL Server 2008 in single user mode, hoping to change the SA password. Right after that I tried to connect to

sqlcmd -S serverName\ss2008

Msg 18461, Level 14, State 1, Server serverName \ SS2008, Line1 Login failed for user 'serverName \ Administrator'. Reason: The server is in single user mode. Currently, only one administrator can connect.

My attempts to change the password immediately give

C: \ Documents and Settings \ Administrator> sqlcmd -U sa -zp @ssword Password: Msg 18470, level 14, state 1, server name serverName, line 1 Login failed for user 's'. Reason: account is disabled.

Is -m really for null user mode, or is something terrible with my server?

+6
source share
1 answer

Your connection may be immediately made by some other service (for example, SQL Agent, Reporting Services)

You can pass the optional optional client name parameter with the -m switch.

eg. using

 -m"sqlcmd" 

Allows the only available connection for a program that identifies itself as sqlcmd client program. See the docs for more details .

+8
source

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


All Articles