--First Check the auto recovery status may be the DB will be in recovery mode
--xp_readerrorlog
--IF Db not in recovery mode and it is Suspect mode
-- Execute the below query line by line after removing comments
-------------------------------------------------------------------------------------------------------------------
--Ref1 : http://www.sql-server-performance.com/2015/recovery-sql-server-suspect-mode/2/
-------------------------------------------------------------------------------------------------------------------
--EXEC sp_resetstatus 'dbname';
--ALTER DATABASE [dbname] SET EMERGENCY
--DBCC checkdb('dbname')
--ALTER DATABASE [dbname] SET SINGLE_USER WITH ROLLBACK IMMEDIATE
--DBCC CheckDB ('dbname', REPAIR_ALLOW_DATA_LOSS)
--ALTER DATABASE [dbname] SET MULTI_USER
--DBCC CheckDB ('dbname')
-------------------------------------------------------------------------------------------------------------------
--Ref2: http://www.stellarinfo.com/support/kb/index.php/article/procedure-to-recover-sql-database-from-suspect-mode
free hit counter |