Q
Problem solve Get help with specific problems with your technologies, process and projects.

'Suspect' SQL Server database solution

If you're SQL Server database is marked suspect, follow MVP Adam Machanic's advice by trying a database state in SQL Server 2005 called EMERGENCY.

My database is marked suspect. What can I do?
The first step is to relax. Panic will get you nowhere, and SQL Server database problems like this can be stressful! So take a few deep breaths and remember that everything will be okay.

Next, read Tibor Karaszi's "Recommended actions for corrupt or suspect databases."

If you get to step six and still cannot get yourdatabase back up and running, it's time to restore from your last good backup. But you still might have a chance to retrieve any changed data that's in the database. SQL Server 2005 introduces a new database state, called EMERGENCY. This state puts the database into read-only, single-user mode, with access allowed by members of the sysadmin role only. This will make your database accessible and let you get in to pull out any data before doing a full restore.

To put a database into EMERGENCY state, use the following T-SQL, substituting the name of your database for 'YourDatabase':

ALTER DATABASE YourDatabase SET EMERGENCY;

This was last published in January 2006

Dig Deeper on SQL Server Backup and Recovery

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchBusinessAnalytics

SearchDataCenter

SearchDataManagement

SearchAWS

SearchOracle

SearchContentManagement

SearchWindowsServer

Close