SQL/MX 2.x Installation and Management Guide (H06.10+, J06.03+)

Performing Recovery Operations
HP NonStop SQL/MX Installation and Management Guide544536-007
12-13
Recovering Tables
5. Use the TMFCOM ALTER DUMPS command to reset the INVALID and
RELEASED attributes of the online dumps for the dropped table to OFF.
6. Execute this RECOVER FILES command:
RECOVER FILES ($DATA4.ZSDADHFW.AL0P3N00, &
$DATA4.ZSDADHFW.BGSB3N00, $DATA4.ZSDADHFW.AL0P3N01,&
$DATA4.ZSDADHFW.BGSB3N01)
Tables With Indexes
Always remember that if a table has indexes, it is better to re-create the indexes along
with the table and then to recover them with the table in the same TMFCOM
RECOVER FILES command. This is because the table and the indexes both need to
agree on which rows the table actually contains. If you do not use the approach, the
recovery will face even greater problems. The number of indexes is maintained in the
file label in the disk directory. When you use MXCI to create just the table and not the
indexes, and later recover the table, additional mismatches will occur between the
SQL/MX catalog or schema and the file label in the directory. This can make the
recovery process even more difficult.
If you implicitly drop the indexes when you drop a table and later use the script
generated by NonStop SQL/MX to recover the table, the indexes will be automatically
re-created and can then be recovered by TMF.
Tables With Partitions
Recovery of partitioned tables requires special attention. After you have re-created the
partitions and recovered them with TMF, the timestamps in the file labels and UIDs in
the resource forks might be wrong for every partition. You would use one mxtool
FIXUP command to correct the timestamps for all partitions and a second mxtool
FIXUP command to correct the UIDs.
Tables With Triggers
When a dropped table with triggers is recovered, the trigger temporary tables for
disabled triggers can be re-created from scratch using the table’s saved DDL. Enabled
triggers cannot be recovered.
When an existing table with triggers is recovered, you need not recover the partitions
of the trigger temporary tables unless they have been physically destroyed or
damaged.
Suppose that the saved DDL for the dropped table CAT.SCH.TO46_TRIG_T2 displays
this output:
CREATE TABLE CAT.SCH.T046_TRIG_T2
(
A INT NO DEFAULT -- NOT NULL NOT DROPPABLE
, B VARCHAR(20) CHARACTER SET ISO88591 COLLATE
DEFAULT NO DEFAULT -- NOT NULL NOT DROPPABLE
, CONSTRAINT CAT.SCH.T046_TRIG_T2_839176264_8137 CHECK