Recovering accidentally dropped objects

If a table or table space is inadvertently dropped, you can recover the object.

About this task

When you recover a dropped object, you essentially recover a table space to a point in time. If you want to use log records to perform forward recovery on the table space, you need the IBM® Db2 Log Analysis Tool for z/OS®
Tip: Begin general-use programming interface information. If you specify WITH RESTRICT ON DROP when you create a table, the table, and the table space and database that contain it, cannot be dropped unless the restriction on the table is removed first. The ALTER TABLE statement includes a clause for imposing this restriction or removing it. End general-use programming interface information.

Procedure

To prepare for recovering accidentally dropped objects, use the following approaches:

  • Run regular catalog reports to collect lists of all OBIDs in the subsystem.
  • Create catalog reports that list dependencies on the table or (such as referential constraints, indexes, and so on).
    After a table is dropped, this information disappears from the catalog.
  • If an OBID has been reused by Db2, run DSN1COPY to translate the OBIDs of the objects in the data set.
    However, this event is unlikely; Db2 reuses OBIDs only when no image copies exist that contain data from that table.