Browse DevX
Sign up for e-mail newsletters from DevX


Recover Dropped Tables in DB2

Inadvertently dropping a database table can be catastrophic. Fortunately, DB2 has a built-in, easy-to-use dropped table recovery feature that can save the day. With some upfront work, you can make your critical tables recoverable.




Building the Right Environment to Support AI, Machine Learning and Deep Learning

lot of ugly things can happen in the early morning hours when you are frantically trying to meet a deadline. For example, your mind can falter for a split second and you might accidentally drop an IBM DB2 Universal Database table. Before your stomach starts twisting in knots and you scramble for your stress ball, relax. Believe it or not, you might be able to recover the table.

This article demonstrates a DB2 feature that allows you to recover tables. By performing a few steps when you create a database, you can recover (no pun intended) from a table dropping mishap.

This Solution assumes you are using DB2 Universal Database Version 8.1. You can download a trial version from IBM.

How do I ensure that the critical tables in my DB2 database are recoverable in case I inadvertently drop them?

Apply DB2's built-in dropped table recovery feature to recover accidentally dropped tables.

Why Not Just Use the Database Restore and Rollforward Functions?
DB2 allows you to recover a database's data using a database restore operation (see Defy Murphy's Law with DB2 Backup and Restore). In fact, you could use the restore operation in tandem with the rollforward operation to restore the database to a point before the table was dropped, but restoring the entire database can be very time consuming. More importantly, during this database-level operation, you can't access your database. On the flipside, with the table recovery feature, your table-level restore effort is more directed, allowing you to use the database in question.

Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date