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.
Control Center support of the Data Restore will:
With Control Center, a user can manage and execute the following Data Restore functions:
There are some important differences between the way Control Center manages Data Restore and database server functions.
Filemodes for Data Restore disk files are used as placeholders only. Control Center will access required disks using the first free filemode.
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.
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.
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.
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.
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:
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.
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.
Using Data Restore functions with Control Center depends upon:
Implementation of Data Restore requires modification or editing of these control files:
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:
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 | +--------------------------------------------------------------------------------+
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 improvements from using Data Restore will be dependent upon the size of the database objects being processed and your overall archive/recovery strategy.