SQL/MP Installation and Management Guide
Performing Recovery Operations
HP NonStop SQL/MP Installation and Management Guide—523353-004
11-9
Restoring a Database as a Planned Event
4. If you need a list of programs that will be invalidated by this procedure, use these
commands to produce a list of programs in a log file:
>> LOG log-file;
>> FILEINFO *.*.* WHERE SQLPROGRAM;
Restoring a Database as a Planned Event
To restore a database as a planned event, follow these steps:
1. Check that SQL is running on the node. The system catalog must be present, and
the TMF subsystem must be running. If you need to reinstall the SQL system,
perform the installation as described under Reinstalling SQL/MP Software on
page 2-10.
2. If you are not performing a volume-mode backup, re-create the catalogs. Use the
SQLCI OBEY command to run the statements in the EDIT file you created before
the BACKUP operation.
The catalog owner is the user ID executing the CREATE CATALOG statement.
Ownership can later be given to another user ID, if necessary, by using the ALTER
CATALOG statement.
3. Issue the RESTORE command.
For a file-mode RESTORE operation, use a set of commands that match those
used in the BACKUP process. This is an example of the RESTORE command:
RESTORE $TAPE, *.*.*, AUDITED, OPEN, LISTALL, TAPEDATE
To restore SQL programs stored in OSS files, use the appropriate OSS utility.
4. After you have restored all the tables and views that the programs use, SQL
compile the programs.
For a volume-mode RESTORE operation, issue a command like this for each disk
volume containing database files:
RESTORE $TAPE, VOLUMEMODE, *
5. SQL compile the programs. A list of programs is saved in a log file created in
Step 3 of the planning activities.
Caution. Do not use the SQLCOMPILE option in the RESTORE command with this type of
restoration. The program compilations could cause invalid programs because dependent
tables, views, and indexes might not yet be restored when the program is restored.
Caution. Use volume-mode RESTORE only if the configuration of the restored disk is identical
to the configuration of the backed up disk. If you change the configuration, you could lose a
volume of data.