Previous Topic: Obtaining REORG StatusNext Topic: SET


RESTORE

The RESTORE control statement is used to recover a database or data file data sets that have been destroyed (for example, from a media failure of the disk containing one of the database data sets).

The SARDBASE program performs the following for a database restore operation:

The SYSOUT groups in the old database are located based on the information in the backup of the master index. They are not located based on the actual master index in the old database because the master index in the old database is probably destroyed. It is imperative that the old database (as it was defined at the time of the backup) be used, and not a copy of the old database. The SYSOUT groups in a copy of the old database have been rearranged and would not match the location information in the backup of the master index.

The database into which the restore is done must be a newly created empty database. The high-level name of the new database must have previously been defined with the NAME control statement (or the PARM parameter of the EXEC JCL statement).

To use the database restore operation, a tape backup of the master index must exist. The RESTORE statement rebuilds the index from a backup or DR tape backup copy.

Either the SARRECV or SARTAPE DD statement must be included in the JCL for the RESTORE job. In general, a site that is concerned with recovery is doing regular database backups. In such an environment, the SARRECV DD statement is included and the SARTAPE DD statement is excluded. This action allows SARDBASE to use the information in the recovery data set to dynamically allocate the correct backup tape.

If the recovery file is not present, you must use the SARTAPE DD statement to specify the archival or DR tape that contains the backup of the master index. The file sequence number of the LABEL parameter must specify the position number of the master index backup on the tape. The position of the backup can be obtained by mapping the tape with the SARTCP program.

Note: Due to IBM JCL limitations, the LABEL parameter cannot exceed 9999.  When the file number of the master index exceeds this value, use the SARRCOV utility to create a recovery file. This file contains the data set name of the backup or DR tape and the file number of the master index. Then leave out the SARTAPE DD statement and specify the name of the recovery file on the SARRECV DD statement.

Note: For more information about SARRCOV, see the chapter "Database Utilities." Sample JCL for this function can be found in CVDEJCL member HAEXRCOV.

The SARDBASE program performs the following for a data file restore operation:

The data file restore is only used when a data file data set is destroyed. The old data file data sets can be renamed and used in the restore operation. New data file data sets must be created prior to performing the data file restore. The data file restore does not restore the master index from a backup cycle and does not require the SARTAPE or SARRECV DD statements. Instead, the master index is read and updated in place. SYSOUT is recovered from the old database or marked for recovery by the SARRSP utility.

Note: The data file restore must not be interrupted. As the restore operation proceeds through the master index, SYSOUT records are updated to reflect its new location in the new data file data sets. If the restore ends prematurely, some SYSOUT would reference the location in the new data file data sets and others in the old data file data sets. A subsequent data file restore could not differentiate these locations and would incorrectly restore data. As a precaution, back up the database with a DASD management product and restore if data file restore ends prematurely.

Syntax:

RESTORE old-name relative-backup [DATA|ASYNCH]

where:

old-name

Specifies the high-level name of the old database that is being restored

If the old database has been completely lost, this operand must be omitted; if it is omitted, only the database index is restored. The operand must be specified to specify a relative backup.

Important! Specify the old database if any of it still exists, so that SARDBASE RESTORE can copy whatever SYSOUT data it can access to the new database. (You can alternatively use the SARRSP utility to load SYSOUT data from backup tapes or an UNLOAD tape.) For a database restore, all SYSOUT data archived since the last backup (or UNLOAD) is lost unless forward recovery data sets were in use.

relative-backup

Specifies the signed relative number of the backup to be used

The most recent backup is specified as +0 or -0. The previous backup is specified as -1. If relative-backup is omitted, +0 is assumed. The value is ignored when the JCL contains a DD statement for SARTAPE or when the DATA parameter is specified.

DATA

Indicates to restore the data file data sets.

ASYNCH

Indicates that online and batch retrieval activities can be resumed while reports are being restored to the database

When the master index is restored, reports that reside in the data files are automatically reinstated.

To restore the data physically into the data files: