SQL/MP Installation and Management Guide

Performing Recovery Operations
HP NonStop SQL/MP Installation and Management Guide523353-004
11-26
Recovery Example
If no objects are identified as inconsistent, recovery is complete. Otherwise,
proceed to Step 9 on page 11-26.
9. Use a licensed SQLCI2 utility to update the timestamps in the SQL catalog to
match those in the file labels for all objects identified as inconsistent in Step 8. Be
sure to use a log file to record the changes to be made. Also, to reduce error, HP
recommends that you use fully qualified object names in the commands you enter.
These commands create a log file and accomplish this updating for the objects
identified in Step 8 on page 11-25 :
>>LOG $DATA.FIXUP.FIX1;
>>UPDATE $DATA.PERSNL.TABLES SET CREATETIME =
211929379570628303
>+WHERE TABLENAME = "\HIL3.$DATA.PERSNL.EMPLIST";
--- 1 ROW(S) UPDATED.
>>UPDATE $DATA.PERSNL.TABLES SET REDEFTIME =
211929379552916402
>+WHERE TABLENAME = "\HIL3.$DATA.PERSNL.EMPLIST";
--- 1 ROW(S) UPDATED.
10. Use the SQLCI VERIFY utility once again, as in Step 8 on page 11-25, to validate
the entries in the catalog against those in the file labels. If you find no mismatches,
you know that recovery of the table and its dependent objects is complete and your
work is done. Otherwise, return to Step 9.
>>VERIFY $DATA.PERSNL.*;
--- Verifying $DATA.PERSNL.EMPLIST
--- $DATA.PERSNL.EMPLIST verified.
.
.
.
11. Use the UPDATE ALL STATISTICS command to update the table statistics:
>>UPDATE ALL STATISTICS for TABLE $data.persnl.employee;
--- SQL operation complete.
12. Determine if any SQL programs access the recovered table and do an explicit SQL
recompilation for those programs using SQLCOMP.
Tables That Have 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, along with the table, in the same TMFCOM
RECOVER FILES command. Otherwise, recovery will face even greater problems. The
number of indexes is maintained in the file label in the disk directory. When you use
SQLCI to create just the table and not the indexes, and later recover the table,
additional mismatches will occur between the SQL catalog and the file label in the
directory, making recovery even more difficult.