question

Neelima avatar image
Neelima asked

bring database to online from suspect

how will u bring the database to online if it is in suspect status??

sql-server-2005databaserecoverysuspect
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Is this an interview or exam question?
0 Likes 0 ·
basit 1 avatar image
basit 1 answered
you use this link [link text][1] [1]: http://www.sqlservercentral.com/articles/suspect/69133/
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

If someone read this article, then please also read valuable feedback from Grant Fritchey, Gail Shaw and Paul Randal in the discussion forum. The article is missing some important details.
0 Likes 0 ·
Usman Butt avatar image
Usman Butt answered
It will always depend upon the situation. Sometimes, it is as easy as taking DB offline and then online OR a restart of the system. The best thing in such case is to have a backup strategy that you can use to recover your database if it is damaged and cannot be repaired. But first one has to dig in to find the root cause before doing the repair. Generally, SQL Error Logs do provide the root cause. Event Logs is another good place which can be beneficial. Then the actual status of the database would also give more information (The following script would give this information) SELECT [name] , [state_desc] FROM sys.databases WHERE [name] = 'YOURDBNAME' Based upon the information we get, further steps need to be taken. Like creating more space in the disk, bringing an offline disk to online could do the job. But more technical tasks may involve Tail-log backup (if possible), copying the mdf and ldf file to another location for safety, running `DBCC CHECKDB(YOURDBNAME) WITH NO_INFOMSGS`, page level restore, drop and reload a table if the data is static etc. You may also end up in a worst case situation where you may have to run DBCC CHECKDB with `REPAIR_ALLOW_DATA_LOSS` which is far from an ideal situation as this cannot be reverted. Having said it all, I would recommend Paul Randal’s [blogs][1] on this as he is the writer of the DBCC and have complete authority on this subject. Moreover, following is a link to a [video][2] session from him on this subject which is a must see. [1]: http://www.sqlskills.com/BLOGS/PAUL/ [2]: http://channel9.msdn.com/Events/TechEd/NorthAmerica/2008/DAT375
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.