TMF Operations and Recovery Guide (G06.26+)

Managing SQL Objects
HP NonStop TMF Operations and Recovery Guide522417-003
C-3
Operations for SQL/MP Only
In the following example, the AUDIT attribute of TABLE1 is altered through SQLCI, so
the table, indexes, and dependent views are subsequently audited:
>> ALTER TABLE TABLE1 AUDIT;
In the following example, the AUDIT attribute of TABLE1 is altered through SQLCI, so
the table, indexes, and dependent views are subsequently nonaudited:
>> ALTER TABLE TABLE1 NO AUDIT;
You can alter the AUDIT attribute of a table only when TMF is active, the disk volume
that contains the table is enabled for TMF transaction processing, and the disk volume
that contains the SQL catalog in which the table is registered is enabled for TMF
transaction processing.
When you alter the AUDIT attribute of an SQL table, all associated views and indexes
are automatically altered accordingly. Likewise, when you alter the AUDIT attribute of
the primary partition of a table, all secondary partitions of the table are automatically
altered accordingly. Note, however, that TMF automatically includes views in online
dumps when they are specified in the fileset, regardless of the AUDIT attribute setting.
You cannot alter the AUDIT attribute of a secondary partition, and you cannot alter the
AUDIT attribute within a user-defined transaction.
An SQL catalog is a group of audited SQL tables. Collectively, all SQL catalogs and
the file labels of tables, views, and indexes constitute the active data dictionary. SQL
catalogs are automatically audited, and you cannot alter the AUDIT attribute of an SQL
catalog table.
If you alter the AUDIT attribute of a table from nonaudited to audited, TMF starts to
protect the table and its dependent objects by entering before-images and after-images
into the designated audit trail.
If you use the TMF file recovery feature, you should make an online dump of the newly
audited table and its dependent objects: the file recovery process cannot recover an
object unless there is at least one online dump of the object.
If you alter the AUDIT attribute of a table from audited to nonaudited, the following
results occur:
All TMF protection for the table and its dependent objects is eliminated. Backout,
volume recovery, and file recovery no longer protect them.
All online dump entries for the table and its dependent objects are marked
RELEASED ON and INVALID ON in the TMF catalog. File recovery no longer
protects them, even if you immediately set the AUDIT attribute back to audited. A
dump could accidentally be deleted from the TMF catalog if the last assigned table
or dependent object in the dump is changed to the released state.