Board logo

subject: Solving 'the Database State Is Not Consistent' Error [print this page]


DB2 databases are often the repository of business data, so it becomes imperative that the data within these database must remain consistent, both logically and physically. One of the critical components that help maintaining the consistency of a DB2 database is transactions, which can get interrupted unexpectedly. If an interruption occurs before all the transactions have been committed or all the modifications have been completed, the database is left in an unusable and inconsistent state. As a crash recovery measure, you need to apply the last available backup or perform some practices to Recover DB2 Database.

A DB2 database can be checked for architectural correctness and consistency of its objects by a command-line tool called db2dart. At times, when you run this tool to check the integrity of your database, it might return you all or an error message, such as below:

The database state is not consistent.

Or

Errors reported about reorg rows may be due to the

inconsistent state of the database.

Or

Found some orphaned extent numbers in a DMS user tablespace

The database might ot might not be accessible.

Explanation

The errors indicate inconsistent state of DB2 database, which doesn't always imply database corruption. This can simply mean that there are still some changes that need to be applied on the problem database.

Transaction failure occurs due to situations that cause database manager or database to stop unexpectedly. These situations can be power failure, hardware failure, or operating system problems.

User Action

To rollback the incomplete work, run RESTART DATABASE command. You need to specify WRITE RESUME option of this command if in case, the database I/O was suspended prior the crash.

If the above crash recovery doesn't resolve the existing problem, your database is severely corrupted. Thus, you should restore it from the last hot or cold data backup. If none of the valid backup is available, you need to use a third-party db2 database repair utility. These tools can scan your corrupted DB2 database and Recover DB2 Database and its objects in exact format and view.

DB2 Recovery is a high-end tool that can scan and repair your corrupted DB2 database with just few simple clicks. The db2 repair tool supports IBM DB2 (UDB) v8 and recovers all database tables, triggers, buffer pools, containers, and other objects. The software comes with a user-friendly interface that makes the application easily operable.

by: Adishree Singh




welcome to loan (http://www.yloan.com/) Powered by Discuz! 5.5.0