SQL/MP Installation and Management Guide

Performing Recovery Operations
HP NonStop SQL/MP Installation and Management Guide523353-004
11-17
Responding to Accidental Loss of an Audited
SQL/MP Object
Responding to Accidental Loss of an Audited
SQL/MP Object
The method for recovering an accidentally dropped SQL object depends on whether
that object is a view, an index, or a table.
Recovery of a single view or index is usually a straightforward operation. Recovery of a
table, however, can be complex and difficult, particularly if the table has multiple
dependent objects. For safety's sake, take the precautions discussed next to prevent
accidental loss of an object or to simplify recovery if it does become necessary.
Recovery Precautions
Set the NOPURGEUNTIL attribute for your objects to some date in the far future,
using the SQLCI ALTER command. For example, this SQLCI command sets the
NOPURGEUNTIL attribute for the table named $DATA.PERSNL.EMPLOYEE to a
safe date. (If this is a partitioned table, this command sets NOPURGEUNTIL for all
partitions.)
>>ALTER TABLE $DATA.PERSNL.EMPLOYEE NOPURGEUNTIL DEC 31 2050;
If you later try to purge the object before the NOPURGEUNTIL date, the purge
fails, and you receive an error message. Now, the only way you can remove the
object is to change the NOPURGEUNTIL date and then retry the purge.
Maintain current OBEY command files containing SQLCI command scripts for
creating and re-creating your SQL tables, indexes, and views.
If you alter an object, be sure to alter the OBEY command file used to create that
object too.
Anytime you perform a SQLCI DDL operation, also request a TMF online dump for
the affected object. (With each new dump, you decrease the number of tapes that
must be processed during future recovery operations.)
Maintain a hard copy of the entire TMF catalog, using the TMFCOM INFO DUMPS,
DETAIL command.
Whenever you request a TMF online dump, back up that dump to tape and use the
TMFCOM INFO DUMPS, OBEYFORM command to obtain a hard copy with that
tape. For good TMF practice, be sure to maintain a backup copy of the entire TMF
catalog on tape.
°
If you perform the dumps with separate groups of disks (for example, a dump
for each group attached to a particular processor), the dumps for your SQL
objects and catalogs will be scattered among numerous tapes. The advantage
of this approach is that you are less likely to miss a vital object during recovery.
Note. Because SQLCI does not provide an OBEYFORM option, you must manually create the
OBEY command files in edit format, using your text editor.