Jun 23, 2017

Dropped-object recovery using Recovery Expert for z/OS


Dropped-object recovery is one such activity that no DBA would ever want to happen. Unfortunately, my team faced a dreadful situation recently of recovering 2 dropped databases (total 277 Tablespaces).
We used Recovery Expert for z/OS tool for this activity. This Tool has its own repository/database called Schema-level repository (SLR), holding replica of all DB2 catalog Tables (with some additional columns). Smart thing we are doing is updating the SLR on daily basis (Data from all DB2 catalog Tables will get copied into the SLR), and this helped us a lot in recovering the dropped databases.

There are 2 approaches to perform dropped-object recovery using Recovery Expert for z/OS.
                     1. Log-based recovery
                     2. Standard recovery

1. Log-based recovery: This approach can be used when the SLR is not getting updated on regular basis. 
This approach involves these steps.
a. Select Log based as the Recovery Type in Create Application Profile panel.
b. Select the time window during which the objects got dropped. 
    This will submit a Log analysis job, that searches in logs for the dropped objects.
         
               
c. Once the Log analysis job is completed, dropped objects can be selected into the Application Profile from the LBDR Scanned Log Range created by Log analysis job.
d. Recovery PIT timestamp will be automatically populated by the Tool. Using that, Recovery Plans will be generated.
e. Appropriate Recovery Plan should be selected for building the Recovery JCLs.
            Recovery JCLs have job steps for
            i.   Re-creation of dropped objects (DDLs execution)
            ii.  Recovery
            iii. REBUILD INDEX

2. Standard recovery: This approach can be used when the SLR is getting updated on regular basis.  
This approach involves these steps.
a. Select Standard as the Recovery Type in Create Application Profile panel.
b. Create an Application Profile to add the dropped objects to that (Tool will read the objects' details from SLR as no entries will be present in DB2 catalog Tables).
c. Update the Recovery options, select PIT timestamp and generate the Recovery Plans.
d. The, build the Recovery JCLs.
            Recovery JCLs have job steps for
            i.   Re-creation of dropped objects (DDLs execution)
            ii.  Recovery
            iii. REBUILD INDEX


So, updating SLR regularly makes the dropped-object recovery activity easy.

No comments:

Post a Comment