DB2 Server for VSE & VM: Data Restore Guide


Step 1. Process a Standard DB2 Archive with Data Restore

Some databases must run 24 hours a day. Since user archives cannot be taken online, only DB2 database archives can be taken if the database must remain online.

There are two ways to process a DB2 archive tape to restore individual tables:

Notes:

  1. You can only translate archive tapes produced by DB2 Version 7 Release 1

  2. Take the online archive with the database in LOGMODE L.

Figure 100. Translating a DB2 Server for VSE & VM Archive into a BACKUP


fig83

Before you can recover from DB2 Server for VSE & VM archives, you need to create some work files.

Recommended sizes for the work files are as follows:

  1. For SYS0001, calculate the space required by using 4 KB for each active page in the DBSPACE.
  2. For HEADER, use 4 KB for each HEADER page in the DBSPACE.
  3. For DIRWORK, use the same size as the directory.
  4. For archives, use the same size of the archive.

Procedures to Translate an Archive into a BACKUP File

Example of JCL (VSE) to translate an archive tape

Figure 101. Sample JCL to Translate an DB2 Server for VSE Archive into a BACKUP File

         // JOB TRANSLATE
(1) ---> // LIBDEF *,SEARCH=(PRD2.DB2vrm,PRD2.RCVvrm)
(2) ---> // TLBL ARIARCH,'ARCHIVE.DB2'
(3) ---> // TLBL ARCHIV,'BACKUP.DB2'
(4) ---> // DLBL SYS0001,,,VSAM,RECSIZE=4096,RECORDS=(100,100)
(5) ---> // DLBL HEADER,,,VSAM,RECSIZE=4096,RECORDS=(100,100)
(6) ---> // DLBL DIRWORK,,,VSAM
(7) ---> // EXEC XTS91001,SIZE=AUTO
(8) ---> TRANSLATE
         /*

Statement 1
Specifies the DB2 Server for VSE and Data Restore libraries.

Statement 2
Specifies the DB2 Server for VSE archive file with ddname ARIARCH.

Statement 3
Specifies the generated BACKUP file with ddname ARCHIV.

Statement 4
Specifies the work file SYS0001.

Statement 5
Specifies the work file HEADER.

Statement 6
Specifies the work file DIRWORK.

Statement 7
Runs the program XTS91001.

Statement 8
Specifies the TRANSLATE function.

Example of an EXEC to translate an archive tape

Figure 102. Sample EXEC to Translate a DB2 Server for VM Archive into a BACKUP File

         /**/
(1) ---> 'FILEDEF ARIARCH TAP1 SL 1 (RECFM FB BLOCK 28672 LRECL 4096'
(2) ---> 'FILEDEF ARCHIV DISK BACKUP DATA G (RECFM VB BLOCK 32760'
(3) ---> 'FILEDEF SYS0001    DISK SYS0001   DATA H(RECFM F BLOCK 4096'
(4) ---> 'FILEDEF HEADER     DISK HEADER    DATA H(RECFM F BLOCK 4096'
(5) ---> 'FILEDEF DIRWORK DISK DIRWORK DATA H(RECFM F BLOCK 0512'
(6) ---> 'FILEDEF SYSIN DISK TRANS SYSIN    A'
(7) ---> 'FILEDEF SYSPRINT DISK TRANS SYSPRINT  A'
(8) ---> 'XEDIT TRANS SYSIN A'
(9) ---> 'XTS91001'

Statement 1
Specifies the DB2 Server for VM archive file ddname ARIARCH.

Statement 2
Specifies the generated BACKUP file with ddname ARCHIV function.

Statement 3
Specifies the work file SYS0001.

Statement 4
Specifies the work file HEADER.

Statement 5
Specifies the work file DIRWORK.

Statement 6
Specifies the SYSIN file which contains the function specification.

Statement 7
Specifies the SYSPRINT file which contains the report.

Statement 8
Allows you to edit the SYSIN file to make any required changes before processing.

Statement 9
Runs the program XTS91001.

The SYSIN file must contain the following statements:

Figure 103. Sample SYSIN to Translate a DB2 Server for VM Archive into a BACKUP File

(1) ---> TRANSLATE

Statement 1
Specifies the TRANSLATE function.

Example of a Report from TRANSLATE

The list of all reloadable tables is displayed on SYSPRINT.

Figure 104. Sample Report after Translation of a DB2 Server for VM Archive

 XTS9-143 OPTIONS
 XTS9-143 TRANSLATE
 XTS9-143 /*
 XTS9-100 Data Restore feature VERSION 7.1.0
 XTS9-193 MOUNT FIRST TAPE OF DATABASE SERVER ARCHIVE
 XTS9-406 ENTER 0(CANCEL) OR 1(CONTINUE)
 XTS9-403 REPLY IS    1
 XTS9-013 TABLE   SQLDBA     .ACTIVITY                       MAY BE RELOADED
 XTS9-013 Table   SQLDBA     .ALLGOOD                        MAY BE RELOADED
 XTS9-013 Table   SQLDBA     .A0001                          MAY BE RELOADED
 XTS9-013 Table   SQLDBA     .A0002                          MAY BE RELOADED
 .
 .
 XTS9-013 Table   SQLDBA     .A0011                          MAY BE RELOADED
 XTS9-007 Processing successfully completed

Notes:

  1. The translate process reads DB2 Server for VM database archive tapes twice.

  2. When the message XTS9-193 is displayed you have to remount the archive tapes beginning with the first archive tape.

  3. You can restore the whole database from the translated DB2 Server for VM database archive, as well as restoring parts of the database.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]