subject: Repairing Corrupt Tables And Tablespaces In Db2 Database [print this page] DMS tablespaces and object tables in DB2 database can be corrupted or damaged due to various logical and physical factors. While the logical corruption scenarios can be caused due to improper server shutdown, human errors, and virus attacks, the physical factors include floods, hurricane, and more. Tablespace or table corruption result into an error message, which makes the records stored in the database inaccessible. For complete and systematic access of database records, an ideal way is to restore them from an updated backup. But, in case of absence of an updated backup or backup getting corrupted or damaged, then you will need to use advanced DB2 Database Recovery software.
Consider a practical instance, where your tablespace went offline due to a hardware failure. Now, when you attempt to switch your tablespace online, you encounter the below error message:
error: DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command.
Furthermore, it returned another error message while SQL processing:
SQL0293N Error accessing a table space container. SQLSTATE=57048
The data stored in your DB2 database became inaccessible after the above error messages appears.
Cause:
The root cause for the occurrence of the above error messages is corruption in database tablespace(s) or object tables.
Resolution:
For complete troubleshooting of the above error message, you will need to determine the extent of tablespace corruption using db2dart command. To resolve the above error message and access the database, you will need to repair the hardware problem and then restore the tablespace.
The above resolution proves successful in most corruption cases. However, if the above resolution fails to resolve your issue and you still encounter the above error message, then you will need to use advanced third-party DB2 Database Recovery application. Such DB2 Recovery tools use high end scanning methods to repair logically corrupted DB2 databases in easy and effective manner. These recovery tools are developed by highly talented database recovery experts and are easily understandable without any prior technical knowledge.