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.