Recovery Utility

Describes the functions of the Recovery utility, and the input and JCL required to run it.
Note: You can also run the Recovery utility as an mfims imsdbu function. See the Recover function topic for details.
Important: To successfully recover a database, all forward recovery log files containing records of all database activity that took place after the last database backup must be present for use by the Recovery utility. Log files must be unlocked to be used in recovery. To unlock log files, stop the server that created them.

The Recovery utility can restore image copy databases, the most recent database updates performed just before a hardware or a system failure, or database updates performed up until a specified point in time.

Upon completion, the Recovery utility output file reports the number of updates applied to each recovered database, according to each recovery log file specified. The updates include the number of writes, rewrites, deletes, and so on.

To restore database image copies, the Recovery utility accepts as input the name and location of each database backup file. Optionally, before running this utility, run the Image Restore utility to copy any database image copy to the current location. To update a database with the most recent changes, the relevant log files must be available on the path specified by the ES_IMS_TLOG_PATH environment variable. The Recovery utility determines the relevant log files required to recover each database.

The utility can recover up to 200 databases in each JCL job. Be aware, however, if the date and timestamp on any given database is significantly older than the other specified databases, we recommend that you recover that database separately to save time. To do otherwise could cause the utility to process a large number of log files unnecessarily, ultimately degrading performance.

By default, when one execution of a database forward recovery job specifies multiple databases, and the Recovery utility cannot recover one or more of the databases specified, it attempts to recover the remaining databases. This can happen, for example, when a required forward recovery log file is missing. In this case, the Recovery utility recovers the databases for which all log files are found. Upon completion of the job, the job SYSOUT dataset contains information indicating the databases recovered and those not recovered.

Optionally, you can specify that the recovery should abend upon encountering the first error. To do this, insert the keyword ABEND as the first statement following the SYSIN JCL card. If the ABEND keyword is specified and the recovery encounters an error, no databases are recovered.

Note: If you want to preserve the state of your current databases before recovery, be sure to copy them elsewhere before running the Recovery utility.

The Recovery utility copies database images as specified in the DD statements to the current location before applying the updates from the forward recovery log files. The JCL includes:

The following examples show the complete JCL required to execute the Recovery utility:

Example 1 - Restore database image copies, and database updates from forward recovery log files

//RUNGDG JOB  'RECOVERY',CLASS=A,MSGCLASS=A
//*
//STOP01  EXEC PGM=MFDBUJCL,PARM='/STO DB BNKTXN'
//SYSOUT    DD SYSOUT=*
//STOP03  EXEC PGM=MFDBUJCL,PARM='/STO DB BNKCUST'
//SYSOUT    DD SYSOUT=*
//STOP04  EXEC PGM=MFDBUJCL,PARM='/STO DB BNKACC'
//SYSOUT    DD SYSOUT=*
//*
//*
//RECOVER EXEC PGM=MFDBUJCL,PARM='RECOVER,SERVER=IMSBANK'
//*
//SYSOUT   DD SYSOUT=*
//BNKIC1   DD DSN=BNKTXN.IC.GDG(0),DISP=OLD               
//BNKIC2   DD DSN=BNKTXNX1.IC.GDG(0),DISP=OLD               
//BNKIC3   DD DSN=BNKCUST.IC.GDG(0),DISP=OLD 
//BNKIC4   DD DSN=BNKACC.IC.GDG(0),DISP=OLD  
//BNKIC5   DD DSN=BNKTXNX2.IC.GDG(0),DISP=OLD          
//SYSIN    DD *
ABEND
BNKTXN         BNKIC1
BNKTXNX1     BNKIC2
BNKCUST       BNKIC3
BNKACC         BNKIC4
BNKTXNX2    BNKIC5
/*
//*  
//START01  EXEC PGM=MFDBUJCL,PARM='/STA DB BNKTXN'
//SYSOUT    DD SYSOUT=*
//START04  EXEC PGM=MFDBUJCL,PARM='/STA DB BNKCUST'
//SYSOUT    DD SYSOUT=*
//START05  EXEC PGM=MFDBUJCL,PARM='/STA DB BNKACC'
//SYSOUT    DD SYSOUT=*
//*

Example 2 - Restore only database updates from forward recovery log files

//RUNGDG JOB  'RECOVERY',CLASS=A,MSGCLASS=A
//*
//STOP01  EXEC PGM=MFDBUJCL,PARM='/STO DB BNKTXN'
//SYSOUT    DD SYSOUT=*
//STOP03  EXEC PGM=MFDBUJCL,PARM='/STO DB BNKCUST'
//SYSOUT    DD SYSOUT=*
//STOP04  EXEC PGM=MFDBUJCL,PARM='/STO DB BNKACC'
//SYSOUT    DD SYSOUT=*
//*
//*
//RECOVER EXEC PGM=MFDBUJCL,PARM='RECOVER,SERVER=IMSBANK'
//*
//SYSOUT   DD SYSOUT=*
//SYSIN    DD *
ABEND
BNKTXN          
BNKTXNX1     
BNKTXNX2 
BNKCUST        
BNKACC          
/*
//*  
//START01  EXEC PGM=MFDBUJCL,PARM='/STA DB BNKTXN'
//SYSOUT    DD SYSOUT=*
//START04  EXEC PGM=MFDBUJCL,PARM='/STA DB BNKCUST'
//SYSOUT    DD SYSOUT=*
//START05  EXEC PGM=MFDBUJCL,PARM='/STA DB BNKACC'
//SYSOUT    DD SYSOUT=*
//*