SQL/MX 2.x Installation and Management Guide (H06.10+, J06.03+)
Performing Recovery Operations
HP NonStop SQL/MX Installation and Management Guide—544536-007
12-10
Recovering Tables
earlier in this discussion. And, as cautioned previously, you should always leave the
SAVE_DROPPED_TABLE_DDL attribute set ON.
For most cases, the recommended approach for recovering a table and its indexes
involves these tasks:
•
Determine what dependent objects (views, indexes, and other tables) might have
been dropped along with the table.
•
Use MXCI to re-create the table, its indexes, and any privileges that you have
granted or revoked. If the SAVE_DROPPED_TABLE_DDL attribute has remained
set ON, use the saved DDL information for re-creating the objects. This information
is preserved in the /usr/tandem/sqlmx/ddl folder.
For complete information on saving DDL and using it to re-create SQL/MX objects,
see these discussions:
°
Retrieving Saved DDL on page 5-26.
°
In the SQL/MX Reference Manual, the information about the DROP TABLE
statement and table management for metadata tables.
The DDL definition of the newly created table must match exactly the DDL
definition of the dropped table. When you re-create the table, execute all of the
statements in the exact order indicated in the saved DDL. Then use TMF to
recover the files for the tables and indexes.
•
Use the TMFCOM ALTER DUMPS command to reset the INVALID and
RELEASED attributes of the online dumps for the dropped objects to OFF.
•
Recover the partitions of the re-created table and indexes with the TMFCOM
RECOVER FILES command, using the FROMARCHIVE and TOFIRSTPURGE
options. To determine the Guardian names of the purged objects, you can use the
Caution. Unless performed with great care and precision, SQL/MX table recovery involves
risk of database corruption and loss of data integrity. This operation should be performed only
by experienced users of NonStop SQL/MX and TMF who understand:
•
How objects are defined in the SQL/MX metadata and the ramifications of altering those
definitions
•
How to use the mxtool utility as described in the SQL/MX Reference Manual
If no one with this expertise is present at your site, contact the HP Global Mission Critical
Solution Center (GMCSC) or your service provider before proceeding.
Note. If you have granted or revoked table privileges, see Example: Recovering Table
Privileges on page 12-11 for guidelines on how to recover the privileges.
Note. If you use the SHOWDDL output to re-create the table, execute all the statements
in the exact order indicated. Doing so ensures that the table and all associated objects are
properly re-created and can be recovered.










