Repair MS SQL Corrupted or Suspected Database
#1
20 April, 2017 - 18:31
Repair MS SQL Corrupted or Suspected Database
Execute the below query by replacing the 'test' with the database name.
EXEC sp_resetstatus 'test' ALTER DATABASE test SET EMERGENCY DBCC CheckDB ('test') ALTER DATABASE test SET SINGLE_USER WITH ROLLBACK IMMEDIATE DBCC CheckDB ('test', REPAIR_ALLOW_DATA_LOSS) ALTER DATABASE test SET MULTI_USER