Thursday, June 24, 2021

SQL SERVER Fix Database in suspect mode

ALTER DATABASE  AdventureWorks  SET  EMERGENCY

DBCC CHECKDB ('AdventureWorks');

ALTER DATABASE AdventureWorks SET SINGLE_USER WITH ROLLBACK IMMEDIATE

DBCC CHECKDB ('AdventureWorks', REPAIR_ALLOW_DATA_LOSS)

ALTER DATABASE AdventureWorks SET MULTI_USER