Error Message:

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

Example:
[sql]
DBCC CHECKDB(‘AdventureWorks’, REPAIR_REBUILD)
[/sql]

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.
[sql]
ALTER DATABASE AdventureWorks SET SINGLE_USER
GO
DBCC CHECKDB(‘AdventureWorks’, REPAIR_REBUILD)
[/sql]

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

Leave a Reply

Your email address will not be published. Required fields are marked *