SQL/MX 3.2.1 Management Manual (H06.26+, J06.15+)
Synchronizing an RDF Backup Database
Whether created and populated online or offline, an RDF backup database must be synchronized
with the primary database before use. This process is described in the RDF/IMP, IMPX, and ZLT
System Management Manual.
Using RDF to Recover Dropped Tables
NonStop SQL/MX can automatically save the DDL for any individually dropped table, which can
be retrieved later if the dropped table needs to be re-created. In addition, if the table needs to be
recovered with TMF or re-created for use in an RDF backup database, the full Guardian file names
are preserved and can be used to create identical file names.
You might not want the EMS log and OSS file space occupied by dropped table information. To
control the saving of dropped table DDL, use a control query default:
control query default SAVE_DROPPED_TABLE_DDL 'OFF';
Alternately, you can change the setting in the system defaults table:
insert into
system-catalog.SYSTEM_DEFAULTS_SCHEMA.SYSTEM_DEFAULTS
(ATTRIBUTE, ATTR_VALUE) values ('SAVE_DROPPED_TABLE_DDL',
'OFF');
The default setting is ON to ensure that you do not lose DDL for individually dropped objects
without intending to do so. Note that the DDL is saved only for user base tables that are explicitly
dropped with a DROP TABLE statement, DDL is not saved for tables that are implicitly dropped.
For example:
• DROP SCHEMA CASCADE statement
• DROP TRIGGER statement
Retrieving Saved DDL
The DDL for a CREATE TABLE statement is written to an OSS file named
/usr/tandem/sqlmx/ddl/catalog.schema.tablename-yyyymmddtimestamp. ddl.
For example, if the table CAT.SCH.TAB01 is dropped at 11:57:15 am on April 23, 2011, the
saved DDL file is:
/usr/tandem/sqlmx/ddl/CAT.SCH.TAB01-20110423-115715.ddl
If the table name contains a delimiter in this list, the delimiter is replaced by an underscore in the
OSS file name:
• " (quotes within the delimited name)
• & (ampersand)
• () (parentheses)
• * (asterisk)
• , (comma)
• / (forward slash)
• ; (semicolon)
• <> (angle brackets)
• ? (question mark)
• [] (square brackets)
• | (bar)
• \ (back slash)
60 Planning Database Security and Recovery










