SQL Server msdb stuck in the Single User Mode after Sitecore install

SQL Errors

Listing the errors below for good googling:


Error1:

Database 'msdb' is already open and can only have one user at a time.

Error2:

TITLE: Microsoft SQL Server Management Studio

------------------------------

Cannot display policy health state at the server level, because the user doesn’t have permission. Permission to access the msdb database is required for this feature to work correctly.

For help, click: https://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&LinkId=20476

------------------------------ BUTTONS: OK ------------------------------

I’ve seen this after installing Sitecore 10.1 on my local environment and I guess it was due to Sitecore install forgetting to remove the Single_user flag on the msdb after installation.

Solution

  1. admin cmd
  2. Open DAC with this command: sqlcmd -A
  3. ALTER DATABASE msdb SET MULTI_USER + Enter
  4. GO + Enter
  5. ALTER DATABASE model SET MULTI_USER + Enter
  6. GO + Enter

Have fun.

Leave a comment