Restoring a ‘SUSPECT’ database on SQL Server 2005 (2)
The previous steps are proven to be failed..oh no, mr. Iman has called me again and asked the progress…hmmm…i have to do something. I tried to ask my friendz, asked myuti, teenteen, and also black dito..but still, no progress have been made.
Finally, i decided to return the database’s state to the last state, the ‘Suspect’ state., just as before i detached it…but how?, how to make a completely detached database to be a ‘suspect’ database again?
hmm…i began to try some of these desperate moves, i hope some miracle would come and bring me the success:
1. I created a new database with the same name and path with the ‘suspect’-ed database.
2. After the database server created the .MDF and .LDF files, i shut down the SQLServer’s services
3. Then i replaced the .MDF and .LDF files with the original .MDF and .LDF file from the ‘suspect’ed database
4. Turn on the service again
voila!!..it worked!, the database were ‘suspect’ again…but what to do next?
After some clicks in the Gugle..i found these links: http://www.codeproject.com/KB/reporting-services/SQL_2005_Suspect_Database.aspx
They’re all about these steps:
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
And….it worked again!!.. my database was normal again; I backed it up in case some disaster might come…well, training for SQLSERVER 2005 is must!