Sample RESTORE SYSTEM control statements

Use the sample control statements as models for developing your own RESTORE SYSTEM utility control statements.

The RESTORE SYSTEM utility uses data that is copied by the BACKUP SYSTEM utility.

Example 1: Recovering a backup system

The following control statement specifies that RESTORE SYSTEM is to recover a DB2® subsystem or a data sharing group to a previous point in time by restoring volume copies and applying any outstanding log changes.

//STEP1    EXEC DSNUPROC,TIME=1440,    
//         UTPROC='',                  
//         SYSTEM='DSN'               
//SYSIN    DD *                        
  RESTORE SYSTEM                       
/*                                                                                           

Example 2: Recovering a backup system after the database volumes have already been restored

The LOGONLY keyword in the following control statement indicates that RESTORE SYSTEM is to apply any outstanding log changes to the database. The utility is not to restore the volume copies. In this example, the database volumes were restored outside of DB2. RESTORE SYSTEM applies log changes; it never restores the log copy pool.

//STEP1    EXEC DSNUPROC,TIME=1440,                                          
//         UTPROC='',                                                        
//         SYSTEM='DSN'                                                     
//SYSIN    DD *                                                              
  RESTORE SYSTEM LOGONLY                                                     
/*                                                                           

Example 3: Recovering a dump on tape of the database copy pool

The following control statement specifies that the RESTORE SYSTEM utility is to consider for restore only dumps on tape of the database copy pool. During the restore, the utility dynamically allocates a maximum of four tape units.

//SYSOPRB JOB (ACCOUNT),'NAME',CLASS=K                      
//UTIL EXEC DSNUPROC,SYSTEM=V91A,UID='TEMB',UTPROC=''       
//*                                                         
//*                                                         
//DSNUPROC.SYSUT1 DD DSN=SYSOPR.SYSUT1,                     
//     DISP=(MOD,DELETE,CATLG),                             
//     SPACE=(16384,(20,20),,,ROUND),                       
//     UNIT=SYSDA                                           
//DSNUPROC.SYSIN    DD  *                                   
    RESTORE SYSTEM FROMDUMP TAPEUNITS 4    							
//