I am using SQL Server 2014 Enterprise Edition on Windows 2012
My SQL database was in suspect mode so, I tried the following:
ALTER DATABASE db_name SET EMERGENCY – Completed
DBCC CheckDB ([MyDB_Prod] — Completed
ALTER DATABASE MyDB_Prod SET SINGLE_USER WITH rollback immediate; — Completed
DBCC CheckDB ([MyDB_Prod], REPAIR_ALLOW_DATA_LOSS); — Failed due to below error.
Nonqualified transactions are being rolled back. Estimated rollback completion: 0%.
Msg 924, Level 14, State 1, Line 5
Database ‘MyDB_Prod’ is already open and can only have one user at a time.
My Questions are:
The database in single user mode then, why I am getting the error, it can be used one user at a time.