Friday, April 16, 2010

Restoring SQL Server 2005 Suspect Database

Post from: http://mshehadeh.blogspot.com/2007/09/restoring-sql-server-2005-suspect.html

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

No comments: