Thursday, January 27, 2011

How to perform SQL database recovery in case of MS SQL Server Error 9004

A transaction log is an important component of database which is often ignored or overlooked as it is not regularly maintained or used by the database administrators or users. It keeps track of all the changes made to the database and maintains a separate data file to store the actual data. Transaction log backup and the corresponding data file backup can be used to perform database recovery in case of a corruption and restore the database to its original state. But the transaction log may get corrupt due to several reasons, such as installing wrong drivers, virus attack, hard drive failure, system table corruption etc. In such situations, the transaction log may become inaccessible and thus, you may not be able to restore your database. To overcome this problem, you need to go for SQL database recovery through a reliable third party utility.

While trying to access a corrupt transaction log, you may see the following error in ERRORLOG or Windows Application Event Log:

"Error: 9004, Severity: 21, State: 1.

An error occurred while processing the log for database 'mydb'. If possible, restore from backup. If a backup is not available, it might be necessary to rebuild the log."

Cause:

This error may have occurred due to any of the following reasons-

The file system is corrupt.
A hardware error
Damaged drivers
SQL Server Engine problem

The transaction log corruption may also lead to a corrupt database. To recover back your lost data in case of any corruption scenario, you need perform SQL recovery by following below mentioned resolution steps.

Resolution:

Try to restore the transaction log from a backup. If you are unable to recover it from a backup, you may try to rebuild the log and bring it on-line.

Rebuilding of the transaction log should be done carefully as it can result in transactional consistency loss in the database. In all these circumstances, you should take help of a reliable database recovery software in order to recover back your lost valuable data from the corrupt database. These software are capable of repairing those database files as well that are not repaired by the DBCC CHECKDB tool.

Stellar Phoenix MSSQL Database Recovery Software is a recovery utility that repairs and restores MS SQL Server databases from all scenarios of corruption. It supports MS SQL Server 7.0, 2000, 2005, and 2008. It can recover all database components including tables, views, rules, user defined functions, indexes, constraints etc. It performs SQL repair by allowing you to search for the corrupt MDF file in your system.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...