SQL Database in Suspect mode


Recently had a database in suspect mode. I didn’t have a backup of the database. After searching online I found this link.

Basically by following the SQL commands you can get it out of Suspect mode and start using the database again. I will admit after running the commands, there were error messages displayed to me in SQL, however the SharePoint site did seem to work afterwards.

EXEC sp_resetstatus 'MyDatabase';
ALTER DATABASE MyDatabase SET EMERGENCY
DBCC CHECKDB('MyDatabase')
ALTER DATABASE MyDatabase SET SINGLE_USER WITH ROLLBACK
IMMEDIATE
DBCC CHECKDB('MyDatabase', REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE 'MyDatabase' SET MULTI_USER

Advertisements