0

I have a problem while connecting to the mssqlsystemresource database.

When I try to connect with DAC connection (without restarting SQL server with -m option) it works, but I can't use the mssqlsystemresource database, because the server is not in Single User mode. The only way to use this database is to restart the SQL server in Single user mode.

But once I restart the server with -m option I can no longer connect with DAC connection. I get this error:

the server is on Single-user mode, only an admin can connect to the server at this moment, SQL error 18461

  • I'm using SSMS on the same server so no need to verify the firewall
  • I have SQL Browser service running
  • I'm using a member of the sysadmin group
  • I have no other DAC connection to this server

enter image description here

enter image description here

I don't know what to do next. Any help, please?

0

I just managed to connect to my SQL Server using DAC, where the SQL Server was started in single user mode. I verified single user mode by looking in the errorlog file.

Using SSMS is not a reliable way to use the DAC or single user mode. SSMS has a tendency to open several connections, and you never know which one comes first - even for a single query window. I used SQLCMD. I managed to connect using SSMS single query window as well, but again, sometimes it works sometimes not depending on the orders for the (background) connections you happen to get.

Use SQLCMD.EXE instead of SSMS.

0

Yes, thank you, it works, but as you said sometimes it works and sometimes no when i restart the SQL server only with a net start ... so now i use MSSQLSERVER\MSSQL\Binn>> .\sqlservr.exe -sMSSQLSERVER -m and it work all the time

2
  • You would need to give us more details. Exactly how are you using NET START? Did you check the errorlog that it is started in single user mode? When it doesn't work, did you use SSMS? What if you use SQLCMD in that case instead? Basically, if you want to understand why something happened, you might need to invest time to investigate and communicate (with details). If you have something that seems to work and you are happy with that, that is fine with me - your choice. :-) – Tibor Karaszi Feb 3 '20 at 12:56
  • @TiborKaraszi you are right, well now it doesn't work even with sqlcmd command. I'll edit my answer to provide more details – ARAZI Feb 3 '20 at 13:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.