SQL/MP Installation and Management Guide

Performing Recovery Operations
HP NonStop SQL/MP Installation and Management Guide523353-004
11-4
Restoring Tables
These inconsistencies can occur because RESTORE PARTONLY uses information
from the backup tape to reconstruct the definition of the recovered partition.
Steps to Restore a Table
To restore a table, perform these steps. Restoring a table invalidates dependent
programs.
1. Identify the table to be restored.
2. Determine the dependencies that will be affected by the drop operation by using
the DISPLAY USE OF command.
3. Enter the RESTORE command at the command interpreter prompt.
4. Determine the status of the dependencies and the validity of the programs by using
the DISPLAY USE OF command or VERIFY utility.
5. SQL compile invalid programs.
Examples of Restoring Tables
This example restores a single table that has no dependencies as this command would
be entered from an OBEY command file:
RESTORE $TAPE, $VOL1.PERSNL.EMPLOYEE, &
CATALOG $VOL1.PERSNL, OPEN, TAPEDATE, LISTALL
This example restores a table with a protection view named PROTEMP and an index
named XEMP. PROTEMP is registered in the same catalog and resides on the same
subvolume as the table. XEMP resides on another volume and is described in catalog
$VOL2.PERSNL.
RESTORE $TAPE, $VOL1.PERSNL.EMPLOYEE, &
CATALOG ($VOL1.PERSNL FOR $VOL1.PERSNL.EMPLOYEE, &
$VOL1.PERSNL FOR $VOL1.PERSNL.PROTEMP, &
$VOL2.PERSNL FOR $VOL2.PERSNL.XEMP), &
OPEN, TAPEDATE, LISTALL
This command restores a single partition of a table:
RESTORE $TAPE, $VOL1.PERSNL.EMPLOYEE, PARTONLY, &
CATALOG $VOL1.PERSNL, OPEN, TAPEDATE, LISTALL
This example restores a table that has dependent indexes, but because the INDEXES
EXPLICIT option is specified, the indexes are not restored automatically unless listed
in the file set list. In this case, the indexes are not specified in the file set list, so only
the table and protection views, if any, are restored.
RESTORE $TAPE, $VOL1.PERSNL.EMPLOYEE, INDEXES EXPLICIT, &
CATALOG $VOL1.PERSNL, OPEN, TAPEDATE, LISTALL