DB2 Server for VSE & VM: Control Center Operations Guide for VM


Chapter 22. Data Restore RELOAD


Overview

RELOAD allows the user to reload and recreate up to 90 tables from a Data Restore BACKUP, translated database archive, or a Data Restore UNLOAD. Control Center requires that a database archive first be translated before it is used as an input source for RELOAD.

Additionally, if the RECOVERY option is set to 'YES', then Data Restore will read log archives and the active log to record additional table LUWs executed since the BACKUP. This source can later be examined with the LISTLOG function and re-executed using the APPLYLOG function.

Data Restore RELOAD requires that the database server be active. It is different from a DBSU RELOAD utility which is used in Control Center for DBSPACE reorganizations, since Data Restore RELOAD does not reload table records in key order. When the tables are reloaded using Data Restore RELOAD, the tables are not reorganized. The DBSU and Data Restore RELOAD formats are not compatible with each other.

To RELOAD from an Incremental Backup, Data Restore first recovers the Incremental Backup pages and then Full Backup pages.

The Control Center RELOAD tool will set up, execute, and manage the Data Restore RELOAD process.


How the RELOAD Tool Works

RELOAD set up consists of several parts.

  1. Selection of the input source for the RELOAD (BACKUP, UNLOAD, or TRANSLATE)
  2. Examination of the recovery sets available for that input source
  3. Building the RELOAD command for one or more tables. For every table listed, the user can choose the appropriate PURGE, NEW, ADD, REPLACE option and enter the required TNAME, CREATOR, NEWTNAME, NEWCREATOR, DBSPACE, OWNER values.
  4. A RELOAD ID (RELOAD identification name) will be chosen which will be used to track the RELOAD event.
  5. The RELOAD control file (RELOAD ID RELDCTL) will be created. This file will include the source file or tapes to be used for the RELOAD, and the formatted list of table RELOAD commands. This file will be sent to the Control Center service machine. The database RELDCTL file includes entries for both the Incremental Backup and the Full Backup. Figure 124 is an example of a RELDCTL file for Incremental Backup.
  6. At execution time, required FILEDEFS and LABELDEFS will be performed, the SYSIN file created, tapes mounted (if required), and the RELOAD routine (XTS91001 MODULE) executed.
  7. If RECOVERY=YES, and the Control Center TAPEPWD=YES option is selected, the Control Center service machine will attempt to change the READ passwords for the database LOG archive tapes that are in the RELDCTL file to 'ALL'. This will allow the tapes to be read by the Data Restore machine. These passwords will be removed when the RELOAD is finished.
  8. If the RELOAD is successful, and RECOVERY=YES, then a LISTLOG will automatically be performed.
  9. The SYSPRINT file (RELOAD ID RELDLIST) will be sent to the Control Center service machine and to the database administrators.

Figure 124. RELOAD Control File (RELDCTL) for Incremental Backup


:DBMACH=TESTDB2 RELOAD RECOVERY=YES from BACKUPREC @06-16-98 11:09:32
#1 DR BACKUP      1998-06-16 11.15.39 300.01 N PM1160
#2 DR REFBACKUP   1998-06-15 13.43.06 300    N VM8451
#3 LOG Archive ACTIVE LOG
END RESTORE SET
:CONTROL.BEGIN :DRSTRT 19980210 :DBMACH=SQL61DB1
RELOAD CREATOR=TESTDBA TNAME=ACTIVITY
      FUNCT=PURGE
:CONTROL.END

RELOAD Control and OUTPUT files

The basic files created will be:

Filename
Description

reload id RELDCTL
The file will contain information about the file or tapes that will be used as the input media for the RELOAD. This file will also contain the formatted table RELOAD commands that will be used in the SYSIN file. The file is kept on the Control Center service machine and will be used each time the RELOAD ID job is executed.

dbmach RELDSYIN
The SYSIN file created on the Data Restore machine to execute the RELOAD. This file contains the Data Restore commands and options to be executed and additional information used by Control Center

dbmach RELDLIST
The output listing of the RELOAD created by Data Restore. The file will be sent to the Control Center service machine and DBAs when the RELOAD is complete.

dbmach LMBRLGx
If RECOVERY=YES, then the LMBRLG1, LMBRLG2 and LMBRLG3 files will be created on the 191 disk of the Data Restore machine. to extract all changes referenced in the log for the reloaded tables.

dbmach LMBRWRK
Work file created by Data Restore if the tables contain LONG columns.

dbmach LISTLOG
If RECOVERY=YES, a LISTLOG will be executed and the file will contain the LISTLOG SYSPRINT created by Data Restore This file will list all the LUWS recorded in the work files for the current RELOAD RECOVERY= YES. This file will be sent to the Control Center service machine.

dbmach RELDLOG
A log of the current RELOAD. The file is maintained on the Control Center service machine. A backup will be made of the previous RELDLOG file.

RELOAD ERROR
If errors occur before, during, or after execution of the function on the Data Restore machine, the RELOAD ERROR file will indicate the error type. If an error condition was detected during Control Center processing, then the name of the module and the approximate line number of the error will be presented. The ERROR file is sent to all database administrators listed in the specific database PARMS file.

Input and Output Media Processing

The output media (LMBRWRK and LMBRLGx work files) will be created on the 191 disk of the Data Restore machine.

The RELOAD input tape (ARCHIV) will use CUU 182, and the LOG input tape (LARCHIV) will use CUU 181.

No tapes file processing is required.

Passwords

RELOAD requires that the database password for user SQLDBA be included in the 'DBAPW=' SYSIN file control statement.

If the database disks are password protected, RELOAD requires the 'READ' password for all of the database disks be included in the 'READPW=' SYSIN file control statement.

A password file (drmach LINKPWDS) file is required. Refer to Appendix C, Password Support, for instructions on how to implement Data Restore password support.

If RECOVERY=YES, then the Data Restore machine must have the authority to READ the database's LOG archive files or tapes. This can be handled manually or attempted through the TAPEPWD option.

How to Invoke RELOAD

To invoke RELOAD, select Option R from the Data Restore Menu (Figure 111).

The first entry panel for the RELOAD tool is shown in Figure 125.

The menus you will use to set up your RELOAD will depend upon whether you wish to perform a normal RELOAD from a BACKUP, TRANSLATE, or UNLOAD, or perform a RELOAD with a LOG recovery, or a restart of a previous RELOAD.

  1. RESTART: If you select to restart a previous reload, you will reuse the input media and table list in a RELOAD ID RELDCTL file that already exists. You will be taken directly to the RELOAD execution menu.
  2. NORMAL RELOAD: If Log Recovery = NO, you will be presented with the RELOAD Selection menu. You will view the HISTORY file for the BACKUP, TRANSLATE, or UNLOAD input source you selected, determine the DATE and TIME stamp for the input you wish to RELOAD, and proceed to create your table list.
  3. LOG RECOVERY: If Log Recovery = YES, then you will be presented with a set of RESTORE Set Selection menus, similar to what is used for the database recovery and TRANSLATE tools. Here you determine your restore set, view the input media control file, and then proceed to create your table list.

Figure 125. Data Restore RELOAD Dbspace Utility Menu

+--------------------------------------------------------------------------------+
| mm/dd/yyyy                     CONTROL CENTER                       hh:mm:ss   |
|*--------------------- Data Restore RELOAD Table Utility --------------------*  |
||                                                          CTRLID: SQMSTDV1  |  |
|| Database ==> SQLDBA                                      NODE:   VMSYSTM1  |  |
||                                                          DRMACH: SQMRESTR  |  |
||                                                                            |  |
|| Log Recovery ==> 1       ( 1= NO 2= YES )                                  |  |
|| Input Type   ==> 1       ( 1= BACKUP, 2= TRANSLATE 3= UNLOAD )             |  |
|| Restart      ==> 1       ( 1= NO 2= YES, Restart RELOAD and use            |  |
||                              same RELDCTL file )                           |  |
||                                                                            |  |
||                                                                            |  |
||                                                                            |  |
||                                                                            |  |
||                                                                            |  |
||                                                                            |  |
||                                                                            |  |
||                                                                            |  |
||                                                                            |  |
||                                                                            |  |
|*---------------------------------------------------------------DRUNLD2------*  |
|PF1 HELP    PF3 QUIT    PF4 EXIT    PF5 MAIN MENU     ENTER RETRIEVE LIST       |
|                                                                                |
|                                                                                |
+--------------------------------------------------------------------------------+

RELOAD Parameters

Parameter
Description

Database
This is the machine name of the database where the tables will be reloaded.

Log Recovery
If Log Recovery is 1 (NO), then no log recovery files (LMBRLGx) will be created, and a LISTLOG and APPLYLOG cannot be performed. If Log Recovery is 2 (YES), the input source must be a BACKUP or TRANSLATE. Th Restartcount option is not valid with RECOVERY=YES.

Input Type
Indicates that you wish to recover tables from either a BACKUP, TRANSLATE, or UNLOAD.

RESTART
Indicates that you wish to restart a failed RELOAD using the same input media and RELOAD table commands. RESTART will skip the input selection, and RELOAD table commands creation panels, and pass directly to the RELOAD execution menu. You must indicate the same RELOAD ID that was used previously. You may also use the RESTARTCOUNT option to skip over records already reloaded. The RESTART option is not valid with RECOVERY=YES. The RESTARTCOUNT option is not valid unless RESTART is indicated.

RELOAD from an UNLOAD

If you selected to RELOAD and UNLOAD, and RESTART=NO, then you will be presented with the Unload Selection menu (Figure 127). From this panel you will view the unload description file (UNLDDESC) or unload history file (UNLDHIST) to determine the timestamp that Data Restore generated for the UNLOAD that you wish to RELOAD.

From this panel, you will press PF5 to review the appropriate history file to determine the DATE and TIME stamps of the UNLOAD that you want to use for RELOAD. For each UNLOAD that you perform, Control Center updates the UNLDHIST file with the media used and the timestamp generated by Data Restore for the UNLOAD. The timestamp for an UNLOAD is identified by an "@" symbol immediately preceding the timestamp. When you return to the menu, you will enter the DATE and TIME stamps, and proceed to the table list panel.

Press PF6 to review the Unload UNLDDESC file which contains all the UNLOAD listing for the database. This file contains the same information that would be generated by the DESCRIBE function. The timestamp for an UNLOAD is identified by the XTS9-142 message. For example, XTS9-142 Base SQLDB2 Date 09/08/98 Time 14:39:43.

Figure 126. Example of UNLOAD UNLDDESC (Describe) file entries

XTS9-100 Data Restore feature VERSION 6.1.0
XTS9-309 Processing DB2 for VSE and VM version 6
XTS9-160 External labeling of this unload is
XTS9-142 Base SQLDB2   Date 09/08/98 Time 14:39:43
XTS9-013 Table SQLDBA  .ACTIVITY           may be reloaded

Figure 127. Unload Selection Menu

+--------------------------------------------------------------------------------+
| mm/dd/yyyy                     CONTROL CENTER                       hh:mm:ss   |
|*--------------------------  Unload Selection  ------------------------------*  |
||                                                          CTRLID:  SQLMDEMO |  |
|| Database ==> SQLDBA                                      NODE:    VMSYSTM1 |  |
||                                                          DRMACH:  DREST41  |  |
||                                                                            |  |
||                                                                            |  |
|| 1)  Press PF5 to review the UNLOAD HISTORY file (UNLDHIST)                 |  |
|| 2)  Determine the DATE and TIME stamps for the UNLOAD you wish to          |  |
||     RELOAD.  The DATE and TIME stamps follow the VOLID/file entry          |  |
||     in the COMPLETION record line.                                         |  |
|| 3)  Input the DATE and TIME stamps below.                                  |  |
||                      EXAMPLE UNLOAD HISTORY ENTRY                          |  |
||     UNLOAD.TEMP Beginning Series 200                                       |  |
||     UNLOAD filled, series 200 Volid VP001 400  - 08/02/97 16:00:00         |  |
||     UNLOAD.TEMP COMPLETED SERIES 200 - 08/02/97 16:00:00                   |  |
||                                                                            |  |
||     Timestamp   ==> __________  ( Date )  _________    ( Time )            |  |
||                                                                            |  |
||                                                                            |  |
|*---------------------------------------------------------------DRRELD4------*  |
|  PF1 HELP    PF3 QUIT    PF5 UNLOAD History     PF6 UNLOAD DESCRIBE            |
|                                                 ENTER  Continue                |
|                                                                                |
+--------------------------------------------------------------------------------+

Figure 128 is an example of an UNLOAD history file and its corresponding DATE and TIME stamp that must be entered on UNLOAD Selection Panel.

Figure 128. Example UNLOAD History file with UNLOAD DATE and TIME stamps

01/03/97 11:41:20 UNLOAD.TEMP Beginning Series 100
01/03/97 11:41:49 UNLOAD filled, series 100 Volid 35UNLO1 DB2VM510 * 400  @ 03/01/97 11:41:42
01/03/97 11:41:50 UNLOAD.TEMP COMPLETED SERIES 100 @ 03/01/97 11:41:42

Restart Selection

If you select RESTART = Yes, the next menu invoked is the Restart Selection menu. Here you will enter the same time and date stamps that were used for the original reload. Since the same RELDCTL file will be used again for the reload, you will not be presented with the Reload Table Command generation menu. Instead, you will be taken directly to the Reload Execution menu.

Figure 129. Reload Restart Selection Menu

+--------------------------------------------------------------------------------+
| mm/dd/yyyy                     CONTROL CENTER                       hh:mm:ss   |
|*----------------------  Reload Restart Selection  --------------------------*  |
||                                                          CTRLID:  SQLMDEMO |  |
|| Database ==> SQLDBA                                      NODE:    VMSYSTM1 |  |
||                                                          DRMACH:  DREST41  |  |
||                                                                            |  |
|| 1. Input the  SAME  DATE and TIME stamp that was used in                   |  |
||    the original reload control file (RELDCTL).  On the next panel          |  |
||    use the same RELOAD ID (filename) as before. CTRLCTR will use           |  |
||    the same file for input media and RELOAD commands.                      |  |
||                                                                            |  |
|| 2. Input the DATE and TIME stamp below. Press Enter to continue.           |  |
||                      EXAMPLE UNLOAD HISTORY ENTRY                          |  |
||     UNLOAD.TEMP Beginning Series 200                                       |  |
||     UNLOAD filled, series 200 Volid VP001 400  - 08/02/97 16:00:00         |  |
||     UNLOAD.TEMP COMPLETED SERIES 200 - 08/02/97 16:00:00                   |  |
||                                                                            |  |
||     Timestamp   ==> __________  ( Date )  _________    ( Time )            |  |
||                                                                            |  |
||                                                                            |  |
|*---------------------------------------------------------------DRRELD6------*  |
| PF1 HELP    PF3 QUIT    PF5 UNLOAD History     PF6 UNLOAD DESCRIBE             |
|                                                ENTER  Continue                 |
|                                                                                |
+--------------------------------------------------------------------------------+

RELOAD from a BACKUP, TRANSLATE and Log Recovery

If you select to RELOAD from a BACKUP or TRANSLATE, you will be lead through a process to perform a reload from either a BACKUP, INCREMENTAL BACKUP, or translated archive. When "Log Recovery" = "2" (yes), then logical units of work (LUWs) will be extracted from the selected log archives. After the RELOAD is complete, Control Center will automatically perform a LISTLOG. You can review the LISTLOG output from the LISTLOG function menu. The selected LUWs can later be re-executed on the database by the APPLYLOG function.

If you are reloading from an incremental backup, Data Restore will first reload the table records from the incremental backup and then reload the unchanged records from the reference backup.

The RELOAD setup process will be:

  1. Select whether to view recovery sets for the latest or all the available recovery sets.
  2. Review the database RESTORE report which lists the available recovery sets. An example of this report can be found in Database Recovery Set Report Showing an Incremental Backup Recovery Set and other Archive Activity. You must remember the number of the restore set you wish to RELOAD. This restore set number will inputted in the next step. You should also note the type of backup and whether it was single or dual backup. If are performing a Log Recovery, you can select "Partial Log" = "Y" (YES) to limit the number of logs that will be processed.
  3. On the select menu you will input the restore set number to RELOAD and whether to RELOAD from the primary or secondary backup.
  4. You will then view the reload control file (RELDCTL). Verify that the file contains the tapes that should be used.
  5. You will then be asked to press the 'PF3' key to cancel the RELOAD or press the ENTER key to continue the RELOAD.
  6. You will then proceed to the "Table Reload Command Generation" menu.

Table RELOAD Command Generation

The next step is to create the list of RELOAD commands for each table that is to be reloaded. See Figure 130. Up to 90 table RELOAD statements can be listed in one SYSIN file. Each RELOAD command must include either the PURGE, NEW, ADD, or REPLACE option that is to be applied, and the appropriate TNAME, CREATOR, NEWTNAME, NEWCREATOR, DBSPACE OWNER and NAME parameters. RELOAD performance will be affected by the number and type of tables listed.

Note:If the selected tables are using Referential Integrity, then you must understand how it will affect reloading the tables. Data Restore does not reload tables in the order presented in the SYSIN file.

When you are finished entering the RELOAD table commands, press PF5 to continue to the RELOAD Execution panel.

Figure 130. RELOAD Table List Panel

+--------------------------------------------------------------------------------+
| mm/dd/yyyy                     CONTROL CENTER                       hh:mm:ss   |
|*---------------------------- Reload Table List -----------------------------*  |
||  Database => SQLDBA                             Selected Tables => 0       |  |
||     P,N,A,R   Table                         Dbspace                        |  |
|| Num  Funct    Creator   Table Name          Owner      Dbspace Name        |  |
|| ---  -----    --------  ------------------  --------   ------------------  |  |
||       P       CREATOR_  TNAME_____________                                 |  |
||          NEW  NEWCREAT  NEWTNAME__________  OWNER___   DBSPACE___________  |  |
||                                                                            |  |
||       _       ________  __________________                                 |  |
||          NEW  ________  __________________  ________   __________________  |  |
||                                                                            |  |
||       _       ________  __________________                                 |  |
||          NEW  ________  __________________  ________   __________________  |  |
||                                                                            |  |
||       _       ________  __________________                                 |  |
||          NEW  ________  __________________  ________   __________________  |  |
||                                                                            |  |
||                                                                            |  |
||                              Page 1     of 1                               |  |
|*---------------------------------------------------------------DRRELD3------*  |
|PF1 Help         PF3 QUIT     PF5 Continue                                      |
|PF7 Back         PF8 Forw                                                       |
|                                                                                |
+--------------------------------------------------------------------------------+

In the next panel (Figure 131), you will decide whether to execute or schedule the RELOAD, and specify the RELOAD ID for the RELOAD, some additional SYSIN file options, and who to notify.

Figure 131. RELOAD Execution Panel

+--------------------------------------------------------------------------------+
| mm/dd/yyyy                     CONTROL CENTER                       hh:mm:ss   |
|*---------------------------- RELOAD EXECUTION ------------------------------*  |
||  DATABASE ==> SQLDBA                                      CTRLID: MSTRSRV1 |  |
||                                                           NODE:   WMAVM1   |  |
||                                                                            |  |
|| Execution       ==> _            ( 1 = Schedule, 2 = Execute Immediately   |  |
||                                                                            |  |
|| RELOAD ID       ==> SQLDBA       (Unique file name for RELOAD event )      |  |
|| The Reload ID (name) will be used as the file name for the RELDCTL control |  |
|| file which will hold media and table list data required for the RELOAD.    |  |
|| If you execute a RECOVERY=YES, the RELOAD ID is the database machine.      |  |
||                                                                            |  |
|| Commitcount    ==> ______  ( Rows to reload before a commitcount.          |  |
|| Restartcount   ==> ______  ( Rows to skip before restarting reload.        |  |
|| Nbviews        ==> ______  ( Estimate number of views to recreate.         |  |
||                                                                            |  |
|| TAPEPWD        ==> 2       ( 1=Yes, 2=No. Perform Tape password processing |  |
||                            ( on LOG archive tapes used in RECOVERY=YES     |  |
|| NOTIFY ==> ________  (Userid)   ________   (Node)                          |  |
||                                                                            |  |
|*----------------------------------------------------------------DRRELD5-----*  |
|PF1 HELP                     PF3 QUIT                  ENTER  CONTINUE          |
|                                                                                |
|                                                                                |
+--------------------------------------------------------------------------------+

Reload Execution Parameters

Parameter
Description

Execution
Used to specify whether to (1) schedule for later execution, or (2) execute the unload immediately. If schedule is selected, you will be presented with the scheduling panel.

RELOAD ID
Unique name that will identify the reload. The name can be a maximum of 8 characters. If RECOVERY=YES, the RELOAD ID will be the database machine name.

Commitcount
Used to specify how many table records to reload before Data Restore will issue a commitcount.

Restartcount
Used to specify how many table rows will be skipped before reloading.

Nbviews
Data Restore assumes a maximum of 200 views may be created with the reload. If the number of views is greater than 200, indicate the number here.

TAPEPWD
Enter '1' (YES) to have Control Center automatically handle changing tape password authority on the LOG archive tapes before and after execution when RECOVERY=YES and the log archive media is tape. If you enter 'N' (NO), it is assumed that you have given the Data Restore machine the required authority to READ the database's log archive tapes, or the LOG archive media is DISK.

NOTIFY
Userid and NODE of person to notify when the RELOAD is successful.

Tape Passwords

While RELOAD does not use the database, it does use archive tapes that belong to the database. The Data Restore machine must have authority to read these archive tapes in order to perform the RELOAD.

If you use a tape management system, then your tape manager will have a password or tape authority process in place. If you use native CMS to manage your tapes, then the tape OPERATOR will control the tape security. During a database or log archive, passwords are not used when the database's tapes are first mounted. However, many tape managers have catalog commands that can be used to later add, change or delete passwords on a tape. Additionally, tape managers can have authority levels, such as the VMTAPE ANYTAPE, that allow a user to mount other user's tapes.

For VMTAPE users,you have several options that you can use. The database RELDCTL file that is created prior to execution of RELOAD lists the files or tapes to be used as input media for the RELOAD. If you choose 'TAPEPWD=Y' from the menu, then the SDRVTPWD EXEC will execute VMTAPE catalog commands on the database against the tapes listed in the database RELDCTL file to add a read password of 'ALL' to the tapes. This will allow anybody to read that tape without the need for a password. After the RELOAD, SDRVTPWD will be used to remove the password from the tapes.

If the archive in the control file was written to disk, or if you have no tape management system (CMS), then no automatic password processing will take place.

There are some restrictions with using the automatic password processing. SDRVTPWD only works with VMTAPE, but it can be modified so that catalog commands for other tape management systems can be used.


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