Tuesday, January 5, 2010

SQL Server database corrupt post Unexpected Shutdown

Database corruption after unexpected system shutdown is a common scenario happened to almost all of us. The database becomes unmountable, further resulting in inaccessibility of records, after being corrupted. In most of these situations, you receive an error message that describes the exact cause of corruption, and sometimes its resolution too. However, if the resolution provided in the error message works, then there is no need to worry. But if in case, the resolution fails, then the best way to overcome database corruption is by restoring the data from an updated backup. Unavailability of a valid backup leaves you with no option, but to use advanced third-party MS SQL Recovery application to repair the database.

Consider a practical scenario, where your database unexpectedly stops and restarts again. On the restart, the database does not mount, and you view the below error messages in the error log file:

“DateTimeSPID Error: 602, Severity: 21, State: 30.
DateTimeSPID Could not find an entry for table or index with partition ID 491897996509184 in database 2. This error can occur if a stored procedure references a dropped table, or metadata is corrupted. Drop and re-create the stored procedure, or execute DBCC CHECKDB.
DateTimeSPID Error: 9001, Severity: 21, State: 5.
DateTimeSPID The log for database 'msdb' is not available. Check the event log for related error messages. Resolve any errors and restart the database.
DateTimeSPID Error: 3449, Severity: 21, State: 1.
DateTimeSPID SQL Server must shut down in order to recover a database (database ID 1). The database is either a user database that could not be shut down or a system database. Restart SQL Server. If the database fails to recover after another startup, repair or restore the database.”

Cause:

Unexpected shutdown could be caused when SQL Server is unable to handle duplicate partition Ids, which are produced in tempdb database.

Resolution:

To resolve database corruption, you will need to opt for advanced MS SQL Repair tool. These tools use advanced scanning methods to repair your database. Such SQL Repair tools do not require any technical skills to perform database repair.

No comments:

Post a Comment