June 2, 2003 at 2:16 pm
Hi all,
I would like to know what to do in case of an emergency "database suspect " case.
I never encounter such a problem.But "what if ?"
Thanks
Lmt
June 3, 2003 at 5:06 am
This should be part of your disaster recovery planning.
A database will be marked as suspect if any of the following conditions is true:
ƒÞ If one or more database files is not available
ƒÞ If the entire database is not available
ƒÞ If one or more database files are corrupted
ƒÞ If a database resource is being held by the operating system (I believe this is from BOL)
Before you remove the ¡¥suspect¡¦ marking from the database you must rectify the problem that caused the database to be marked as suspect first. The SQL Server Error log may provide the information required identifying the cause of the problem.
Execute sp_resetstatus using the database name as an argument to the stored procedure. The database must be rebooted immediately following the execution of this stored procedure. (Stop and start MSSQLService, it is not necessary to reboot the actual box).
Because this procedure modifies the system tables, the system administrator must enable updates to the system tables before creating this procedure. To enable updates, use this procedure:
USE master
GO
sp_configure 'allow updates', 1
GO
RECONFIGURE WITH OVERRIDE
GO
After the procedure is created, immediately disable updates to the system tables:
sp_configure 'allow updates', 0
GO
RECONFIGURE WITH OVERRIDE
GO
Restoration of your DB(s), System DB(s) and rebuilding System DB(s) should also be part of your disaster recovery planning.
Nigel Moore
======================
June 3, 2003 at 7:55 am
Thank you
LMT
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply