A blog with focus on technology, internet, mobile phone, IT Security, databases, open source, operating systems, Servers, news and life style

Interesting Sites

Archives

Recover SQL Server Database from Suspect Mode

To recover database from suspect mode in SQL Server 2005 / 2008 use this script in MS SQL Server management Studio:

EXEC sp_resetstatus ‘yourDBname’;
ALTER DATABASE yourDBname SET EMERGENCY
DBCC checkdb(‘yourDBname’)
ALTER DATABASE yourDBname SET SINGLE_USER WITH ROLLBACK IMMEDIATE
DBCC CheckDB (‘yourDBname’, REPAIR_ALLOW_DATA_LOSS)
ALTER DATABASE yourDBname SET MULTI_USER

Note: change ‘yourDBname’ with database name you want to recover from suspect mode.

Leave a Reply

*