How to Change a Database From Single User Mode?
Resolved SQL
OE
Owen Ellis
November 28, 2026
4 replies
64 views
Reviewed by moderators
3 participants

My database is stuck in single user mode and I get Database is already open and can only have one user at a time. How do I set it back to multi user?

Accepted answer
Marked as the solution to this question

Use ALTER DATABASE from the master database. This needs ALTER permission on the database.

1. Open a new query window and execute USE master first.
2. Execute ALTER DATABASE [YourDatabase] SET MULTI_USER WITH ROLLBACK IMMEDIATE.
3. Execute SELECT name, user_access_desc FROM sys.databases to confirm that the value is MULTI_USER.

ROLLBACK IMMEDIATE rolls back open transactions and disconnects other sessions. Tell your team before you use it. In SSMS you can also open Database Properties, select Options and change Restrict Access to MULTI_USER.

I still get the error, because another session takes the one connection first.

That is the common trap. In single user mode, one other session can grab the only connection before you do. Find it and end it in the same batch:

1. Execute SELECT session_id, login_name, program_name FROM sys.dm_exec_sessions WHERE database_id = DB_ID('YourDatabase').
2. Execute KILL with that session ID.
3. Execute the SET MULTI_USER statement right away in the same query window.

Check for background services too, like a web application or a monitoring tool that reconnects on its own. Stop that service before you try again.

Found a reporting service holding the session. Back to multi user. Thanks.