Giving Error during a SINGLE_USER change requires the exact error and database state. My original case lacked enough diagnostic detail.

SELECT name, state_desc, user_access_desc, is_auto_update_stats_async_on
FROM sys.databases WHERE name = N'YourDatabase';
-- Planned access-mode change from an appropriate master connection:
-- ALTER DATABASE [YourDatabase] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
-- Restore the approved normal access mode after the intended operation:
-- ALTER DATABASE [YourDatabase] SET MULTI_USER;I previously suggested setting EMERGENCY first. That does not repair an unexplained underlying failure. It is not the default response to a SINGLE_USER error.
Check permissions, database state, connections and asynchronous statistics activity. An application, Object Explorer or another connection can occupy the single slot. Diagnose through a controlled connection instead of repeatedly forcing modes.
ROLLBACK IMMEDIATE can disconnect users and roll back transactions. Production changes need approved maintenance, recoverable backups and verified return to required access. A damaged database needs an error-specific diagnosis and recovery path. Preserve evidence first.
Related reading
- Comprehensive Database Performance Health Check
- SQL SERVER – sp_who2 Parameters
- SQL SERVER – Fill Factor – Instance Level or Index Level
- SQL SERVER – Disable Rowgoal Optimizer
- SQL SERVER – Number of Rows Read – Execution Plan
- SQL SERVER – DBCC DBREINDEX and MAXDOP Not Possible
- SQL SERVER – Attach an In-Memory Database with T-SQL
EMERGENCY mode is not a general SINGLE_USER prerequisite, it is a restricted troubleshooting state for exceptional recovery situations.
Published by Pinal Dave on SQLAuthority. More of my work at pinaldave.com.
Discover more from SQL Authority with Pinal Dave
Subscribe to get the latest posts sent to your email.




