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


Chapter 18. Data Restore Support


Overview

When the Data Restore feature has been installed and enabled, Control Center gives users the ability to automate, manage, track and schedule Data Restore functions on one or more DB2 Server for VM databases.

See Chapter 6, Data Restore Setup with Control Center for installation and setup instructions.

Data Restore UNLOADS or retrieves data and system information about a database by directly reading the database data and directory disks. In this way the normal database routines are bypassed and commands can be issued against the database whether it is running ONLINE or OFFLINE. The Data Restore machine must have read/write access to all of the database's data, directory and log disks.

Description

Control Center support of the Data Restore will:


Data Restore Functions

With Control Center, a user can manage and execute the following Data Restore functions:

Function
Definition

APPLYLOG
Performs log forward recovery. Executes all of the SQL statements for the table(s) generated by the RELOAD function. A user can indicate where to stop a log forward table recovery by indicating the time/date stamp of the LUW listed in the LISTLOG output. The RELOAD with RECOVERY=YES and LISTLOG functions must be executed first. LISTLOG is only needed if the timestamp is specified (which is most of the time).

BACKUP
A BACKUP is a a User Archive using Data Restore BACKUP that backs up the whole database. An Incremental Backup is a USER ARCHIVE using Data Restore BACKUP with the INCREMENTAL option that backs up only those data pages which have changed since the last Full Backup or ARCHIVE FULL.

LISTLOG
Lists all the database LUW statements from the active log and log archives for the table(s) selected. The log output is written to working files on disk. This function can only be used after executing RELOAD with option RECOVERY=YES.

RELOAD
Loads from 1 to 90 tables from either a Data Restore translated database archive, BACKUP, or UNLOAD. If option RECOVERY=YES is chosen, RELOAD collects LUW log activity for the indicated table(s). Log forward recovery of table LUWs can later be executed using the LISTLOG and APPLYLOG functions.

RESTORE
Restores a complete database from a Data Restore BACKUP.

TRANSLATE
Converts a database archive to a Data Restore BACKUP format. Several working files are created. These files must be available in order to process RESTORE and UNLOAD commands from the translated archive.

UNLOAD
Selectively unloads one or more DBSPACES in order to retrieve table data, definitions and authorizations.

SHOWDBS
The Data Restore SHOWDBS command will retrieve information about a database's HEADER, DATA and INDEX pages for ALL acquired dbspaces. The SHOWDBS command can be executed when the database is online or offline. SHOWDBS can be executed on the CMS command line by: SQM dbmach SHOWDBS.

Important Considerations

There are some important differences between the way Control Center manages Data Restore and database server functions.

  1. A password file, discussed in more detail in Password File Setup for the Data Restore machine, is required.
  2. Control Center will perform all the minidisk links and accesses necessary to manage Data Restore functions. This lets Control Center manage disk access for multiple databases. Any disks Control Center accessed during Data Restore functions will be detached when the functions are completed.
  3. Disk file definitions for Data Restore functions in the UNLTAPES and TAPES files must include the actual disk address (as defined in the VM directory) and not the access cuu of the file. Control Center will link to the actual address using the first free cuu starting with cuu 120.

    Filemodes for Data Restore disk files are used as placeholders only. Control Center will access required disks using the first free filemode.

  4. A separate SDRESTOR DIRECTRY file is required on the Control Center code disk. The SDRESTOR DIRECTRY will be used in menu operations to provide a map between a database and the Data Restore machine that will perform the Data Restore functions. See Setup Step 8: Create the SDRESTOR DIRECTRY for information about creating this file.
  5. You should set your PREMOUNT_DRTAPE option in the database PARMS file to "N", unless your tape management system does not include the DMSTVI tape exit. The PREMOUNT_DRTAPE option, is described in more detail in Data Restore Parameters in the Database PARMS File. The DMSTVI tape exit will automatically perform all tape mounts based on VOLID information contained in the FILEDEF and LABELDEF performed prior to executing the Data Restore functions.

    With typical database archives, mounting the tape before the archive begins, improves availability because the database can take a checkpoint as soon as the archive starts, instead of waiting for completion of the tape mount.

    In both the server and Data Restore functions, if the tape manager is set to NONE or blank, or if the DMSTVI MODULE is not present, the tapes will be premounted automatically.

  6. All Data Restore functions will be executed on the Data Restore machine. This means that the DASD and tapes will be owned by the Data Restore machine. The reasons for this are to:
    1. Segregate Data Restore from the database manager.
    2. Allow ownership of tapes to be held by the Data Restore machine. This will facilitate tape mounting for RESTORE operations.
    3. Allow table RELOADs from BACKUP tapes. RELOAD tables requires that the database server be up and running, so the command cannot be executed on the database manager. This will allow RELOAD to be performed from either BACKUPs or UNLOADs without the need for additional tape authority. Executing a RELOAD RECOVERY will require tape authority for the database log archive tapes or read access to the log archive disk file.
  7. Any changes made to Data Restore parameters in a given database PARMS file WILL be used during the next Data Restore function, regardless of the status of the database. This is because Data Restore parameters in the database PARMS file are re-initialized on the Data Restore machine prior to each Data Restore function.
  8. A secondary status called "DBSTAT2" will be used to track Data Restore machine status changes when two tapes must be managed concurrently, such as during a DUAL BACKUP. Both the DBSTATUS and DBSTAT2 GLOBALV values will be updated as required.
  9. Required block size and RECFM FILEDEF options for Data Restore work files are pre-determined and cannot be modified by the user.

Disk and Tape Passwords

A password file (LINKPWDS) is required to support to provide the database server password for 'SQLDBA' to Data Restore and, if necessary, to support the Data Restore machine's links to the database's directory, log, data, and archive disks. See Password File Setup for the Data Restore machine for information about creating this file.


Architecture

Command and control of the Data Restore machine activities will be accomplished through a combination of the database and support machine methodologies.

For automated operations, the Data Restore machine runs as a disconnected machine and uses the Single Console Image Facility (SCIF) to give control of its console to Control Center. This will enable unattended operation of Data Restore functions under the supervision of a Control Center service machine.

Data Restore functions, such as UNLOAD, that are initiated by users, or initiated by the database manager (SQLEND UARCHIVE using BACKUP), are first processed by Control Center. It checks the authorization of the user to execute the function, changes the status of the Data Restore machine to indicate the database involved and the Data Restore function that is to be executed. It will then use SCIF to execute the appropriate program on the Data Restore machine.

All Data Restore functions will execute on the Data Restore machine. Only one database can be processed at a time on a particular Data Restore machine.

Unlike a database, the Data Restore code is not running all of the time. With the SCIF interface, Control Center knows when Data Restore code is executed. The program executing on the Data Restore machine will perform the necessary FILEDEFs and LABELDEFs, SYSIN file creation, and any other setup required. The Data Restore function executes while Control Center monitors the Data Restore machine's console.

If necessary, Control Center responds to any Data Restore messages. When the Data Restore function is complete, the result will be indicated to Control Center, and appropriate notifications made. After the Data Restore function is finished, its status will return to NORMAL, and the Data Restore machine will be free to process the next function.

As with databases, all control files and logging activity associated with the Data Restore machine will be updated and maintained on the Control Center service machine.


Message and Command Processing

The SCIF interface allows Control Center to receive console messages, and place commands and responses directly on Data Restore's console as if it were logged on to the Data Restore machine.

The use of SCIF lets Control Center respond to messages that are produced on the Data Restore machine console while the Data Restore modules are executing.

Much like a database, messages produced by the Data Restore machine, such as TAPE ATTACHED, error and action messages, and other information will be processed asynchronously by Control Center. Each message will be processed in turn. If the incoming message matches one of the messages in the DATABASE MESSAGES file, the appropriate action will be taken.

If a response is required by the Data Restore machine, the SQMCPSND EXEC (using CP SEND) is used to put commands directly on the Data Restore machine console. SQMCPSND exits as soon as the command or response is successfully sent and does not wait until the issued command is completed. Control Center can move on to the next message or action to be processed, thereby allowing quick asynchronous operation.

SCIF messages contain the userid of the sender. This userid will indicate which Data Restore machine is involved. To track which database the Data Restore function is being executed against, the GLOBALV group, DBSTATUS for that Data Restore machine, will be updated to include the database machine name involved and information about the functions being processed, each time a database job is executed on the Data Restore machine.

The DBSTATUS for the Data Restore machine, described in more detail in Status Tracking, is separate from the DBSTATUS of the database manager. By using this design, Control Center can monitor activities of both the database and Data Restore machines.


Communicating with Data Restore

During menu operations, the SDRESTOR DIRECTRY file will be used to associate one or more Data Restore machines with the proper Control Center service machines and databases. This lets the user issue commands against local or remote Data Restore machines. Control Center uses SDRESTOR DIRECTRY to determine which Data Restore machine is associated with the database, and which service machine is managing that Data Restore machine. The command will then be routed to the proper Data Restore machine's console.

While the Data Restore functions are executing, parameters in the database PARMS file, and the Data Restore machine DRPARMS file, will be used to associate a Data Restore machine with a database and the service machine.

The following association between the Data Restore machine, database machine and Control Center must be setup in order for the proper automated control and management of Data Restore functions to occur:

Interfaces

If the Data Restore machine is not running disconnected, the SCIF connection will be broken. Control Center will not be able to issue commands on the Data Restore machine's console or respond to appropriate Data Restore functions.

If logged on to the Data Restore machine, a user can execute Data Restore functions directly without the intervention of the Control Center service machine.

Status Tracking

In order to track which database and Data Restore function is currently executing, a set of 'DBSTATUS' and 'SQMODE' GLOBALV values for each Data Restore machine will be used to control the flow of activity and anticipate responses. This is similar to the current database DBSTATUS and SQMODE strategy. Refer to Chapter 15, Database Status Tool.

For the Data Restore machine's DBSTATUS, the first word will indicate what database manager is involved. If the Data Restore machine is not processing any Data Restore functions, the DBSTATUS and the SQMODE will be 'NORMAL'.

When the DBSTATUS for a Data Restore machine is not 'NORMAL', users will not be allowed to initiate new Data Restore functions.

Secondary status called 'DBSTAT2' will be used to track Data Restore machine status changes when two tapes must be managed concurrently, such as during a DUAL BACKUP. Both the DBSTATUS and DBSTAT2 GLOBALV values will be updated as required.


Installation Considerations

Using Data Restore functions with Control Center depends upon:

  1. Installing the Data Restore Feature as described in DB2 Server for VSE & VM Data Restore.
  2. Updating the required control files, and
  3. Executing of Control Center's installation procedure for Data Restore support (Chapter 6, Data Restore Setup with Control Center).

Control File Setup

Implementation of Data Restore requires modification or editing of these control files:

Resources

Data Restore functions either require, or have the option of, output to DASD. Control Center will use the A disk of the Data Restore machine for SYSIN, SYSPRINT, and control files. Additional minidisks will be required to store the output from Data Restore functions.

Considerations that affect the size and number of minidisks needed include:


Invocation

You can invoke Data Restore functions with Control Center through:

Figure 111. Data Restore Primary Menu

+--------------------------------------------------------------------------------+
| mm/dd/yyyy                 CONTROL CENTER                       hh:mm:ss       |
|*------------------------------- Data Restore Menu -------------------------*   |
|| Option ===>                                              CTRLID: MSTRSRV1 |   |
||    Database ===> SQLDBA                                  NODE:   VMSYSTM1 |   |
||                                                          DRMACH: DREST41  |   |
||                                                                           |   |
||     T  TRANSLATE ARCHIVE          TRANSLATE archive into BACKUP format    |   |
||     U  UNLOAD DBSPACES            UNLOAD one or more dbspaces             |   |
||     R  RELOAD TABLES              RELOAD one or more tables               |   |
||     LL LISTLOG                    LISTLOG selection panel                 |   |
||     AL APPLYLOG                   APPLYLOG selection panel                |   |
||     VJ VIEW JOB SCHEDULE          VIEW database job schedule              |   |
||     S  VIEW DRMACH STATUS         VIEW Data Restore Machine status        |   |
||     SR RESET DRMACH STATUS        RESET Data Restore Machine status       |   |
||     D  SHOWDBS                    Generate report about all dbspaces      |   |
||          View Tapes   Edit Tapes    View History    View Log              |   |
||  BACKUP      BT          BM             BH             BL                 |   |
||  UNLOAD      UT          UM             UH             UL                 |   |
||  TRANSLATE   TT          TM             TH             TL                 |   |
||                                                                           |   |
||           Enter OPTION, select DATABASE, press ENTER to process           |   |
|| The requested command was issued                                          |   |
|*---------------------------------------------------------------SDRMAIN-----*   |
|   PF:   1 Help    3 End                                                        |
+--------------------------------------------------------------------------------+

Authorization

A user must be authorized in the database PARMS file or the SQLMSTR Profile to execute Data Restore functions. The database PARMS file includes authorizations that affect the database. The SQLMSTR PROFILE controls authorities for ADMINISTRATIVE commands that will be executed on the Data Restore machine.

To issue Data Restore functions, the user must, at a minimum, be listed as a database administrator in the database PARMS file. This file is also be used by the Data Restore machine.

If the user is listed as a Control Center Administrator (Level 5), in the Control Center's SQLMSTR Profile, all commands (including Data Restore functions) can be issued by that user against all databases controlled by that Control Center service machine.

For more details, see Maintaining the SQLMSTR PROFILE File.

Performance

Performance improvements from using Data Restore will be dependent upon the size of the database objects being processed and your overall archive/recovery strategy.


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