How To Restore DB2 TableSpaces

  1. Determine the approximate date and time of the restore point.
  2. Restore a backup of the BSDS that was taken after the restore point, During the restore, rename the dataset to something different than the current active BSDS. //USRNAMEA JOB CLASS=A,MSGCLASS=X,NOTIFY=USRNAME
    //STEP1 EXEC PGM=ADRDSSU,REGION=0M
    //SYSPRINT DD SYSOUT=*
    //TAPE01 DD DSN=BACKUP.DATASET,VOL=SER=(006596),
    // DISP=(OLD,KEEP),UNIT=3590-1,LABEL=(1,SL)
    //DISK01 DD UNIT=SYSDA,DISP=OLD
    //SYSIN DD *
    RESTORE DATASET(INCLUDE(DB2PROD.BSDS01.**)) -
    RENAMEUNCONDITIONAL(USRNAME) -
    INDDNAME(TAPE01) -
    OUTDDNAME(DISK01) -
    CATALOG
    //
  3. Run the LOGMAP utility to get the log RBAs at the checkpoints. //DEVDRGSA JOB CLASS=A,MSGCLASS=X,NOTIFY=DEVDRGS
    //LOGMAP EXEC PGM=DSNJU004,REGION=0M
    //SYSUT1 DD DSN=DEVDRGS.BSDS01,DISP=SHR
    //SYSPRINT DD SYSOUT=*
    //
    Select the RBA of the desired restore point. If the checkpoint queue in the report does not span the entire range of time between backups of the BSDS, increase CHKFREQ in DSNZPARMs or back up the BSDS more frequently.
  4. Using the DSN1LOGP utility or a log analzyer, adjust the RBA of the restore point, if necessary, to avoid any units of work in progress.

Next: QMF Commands 

Home > Computers > Databases > IBM DB2 > Restore

Viewing mobile website page. Switch to WML or Full HTML