Msg 7919, Level 16, State 3, Line 1 Repair statement not processed. Database needs to be in single user mode.

Posted on : 29-05-2012 | By : Devi Prasad | In : DBCC Commands, Msg 7919

0



Error Message:

Msg 7919, Level 16, State 3, Line 1
Repair statement not processed. Database needs to be in single user mode.

Example:

DBCC CHECKDB('AdventureWorks', REPAIR_REBUILD)

This error occurs when DBCC CHECKDB command is issued when the database is not in Single user mode.

Fix/Resolution:
Change the database to Sinle user mode and run the query.

ALTER DATABASE AdventureWorks SET SINGLE_USER
GO
DBCC CHECKDB('AdventureWorks', REPAIR_REBUILD)

Dont forget to bring the database to the user mode in which it is present before after running the query.




Reference : Devi Prasad (sqlserverlearner.com)

Do you like my blog?

If you liked reading this blog, please help spread the word by sharing this blog with your friends.



Need Help On SQL Server?

Cannot Find Solution to your problem (or) If you are looking for some help on SQL Server. Dont worry Click Here to Post your question and solve your issue.




Your Ad Here


Tags: , , ,