Exit single-user mode

How do I exit out of single-user mode? I don't have any user using this database. I was trying to restore a database from a different instance into a new database that I just created. Then I see it says it's in Single User mode after the restore failed.

The solution is this:

-- Start in master
USE MASTER;

-- Add users
ALTER DATABASE [my_db] SET MULTI_USER
GO

 

Maintenance Plan Execute option is greyed out

When I go to SQL Server Management Studio -> Management -> Maintenance Plans -> Right click on the maintenance plan that I want to execute but the option is greyed out.

  • I have checked and SQL Server Integration Services is running.
  • I can execute other maintenance plans.
  • I have even tried modifying this plan without an issue but Execute stays greyed out.
  • There is no other instance of the plan running at the moment.
  • I have also disconnected from the SQL Server and connected back but that didn't help either.
  • SQL Agent is running.

Solution:

Turns out it was an execution window that was buried. It doesn't show as an "open window" when you look at the taskbar at the SSMS icon, so it's deceptive. ALT-TAB your way through the windows and you should find it.

The open windows was:

From here: sql server - Maintenance Plan Execute option is greyed out - Stack Overflow