DB2 database has a number of components, which are responsible for ensuring consistency of the database and transaction is one among them. Database transactions may unexpectedly get interrupted, causing database inconsistency. If transactions are interrupted before completion of all the database modifications, it becomes unusable and inconsistent.
You can check the consistency and structural correctness of the database using db2dart utility. It is a command-line tool that helps you check the database corruption. When you try to check database consistency using this utility and attempt to recover DB2 database, you may encounter any of the below error messages-
- "The database state is not consistent."
- "Found some orphaned extent numbers in a DMS user tablespace"
- "Errors reported about reorg rows may be due to the
inconsistent state of the database."
Cause
You may encounter this problem due to inconsistency of the database. It usually occurs because of incomplete database transactions. It does not always occur due to database corruption, but still it is possible that database corruption can cause the above errors. Corruption could be the outcome of virus infection, improper system shutdown, application malfunction, and other similar reasons.
Resolution
You can recover DB2 data using any of the below steps-
- Run RESTART DATABSE command to rollback entire process. You are required to specify the WRITE RESUME parameter with this command if input/output operation of the database was suspended.
- If above method does not work, restore database from backup. To ensure complete DB2 recovery, the backup must be valid and updated.
- In case none of the above methods work, DB2 database recovery software come for your help.
DB2 recovery tools methodically scan whole database and extract all inaccessible data from it. They enable you to recover DB2 database in safe and easy way with read-only conduct and simple user interface.
Stellar Phoenix DB2 Recovery is the most efficient solution to recover DB2 data after corruption. This DB2 repair software works in all cases of corruption.