SQL/MP Installation and Management Guide
Performing Recovery Operations
HP NonStop SQL/MP Installation and Management Guide—523353-004
11-7
Restoring Databases
If you are restoring databases, file set lists, or moving objects, you might not want to
use the SQLCOMPILE ON option. The recompilations can be unsuccessful if objects
are restored alphabetically by volume, subvolume, and file name. If programs are
restored before the tables, views, or indexes on which they depend are restored, the
recompilations will be unsuccessful.
To restore a program, follow these steps:
1. Determine the name of the program and the tables or views used by the program.
2. Perform the RESTORE command.
3. If the RESTORE command uses SQLCOMPILE OFF, compile the program to
validate and register the program in a catalog. You can use the STOREDDEFINES
option in the SQLCOMP command if you are not restoring the programs on a
different node.
This example restores a program. After being restored, the program is no longer SQL
sensitive and is no longer registered in a catalog; therefore, the program must be
explicitly SQL compiled.
RESTORE $TAPE, $VOL1.PERSNL.PROG1, TAPEDATE, LISTALL
This example uses the SQLCOMPILE ON option of the RESTORE command to
restore and compile a program. The command specifies the catalog in which the
program is registered.
RESTORE $TAPE, $VOL1.PERSNL.PROG1, SQLCOMPILE ON, &
CATALOG $VOL1.PERSNL, TAPEDATE, LISTALL
To restore SQL programs stored in OSS files, use the appropriate OSS utility.
Restoring Databases
Restoring a complete database should be a simple process, as long as the system
configuration is identical to the configuration when the backup was performed.
If you are planning to restore a complete database but include such operations as
renaming the disk volumes, adding new volumes, or making other configuration
changes, see Section 9, Moving a Database.
You can simplify restoring a complete database by performing certain steps before the
RESTORE. If you are planning a complete database restoration for some planned
event, you can accomplish the complete restoration by using only the RESTORE utility
for both audited and nonaudited files and SQL objects.