TMF Operations and Recovery Guide (G06.24+)

Managing SQL Objects
HP NonStop TMF Operations and Recovery Guide522417-002
C-2
Operations for SQL/MP Only
Operations for SQL/MP Only
In SQL/MP, when you create a table, you can set the AUDIT file attribute to determine
whether the table is audited. At any time thereafter, you can alter the AUDIT attribute
setting or display its current value. The following discussion explains how to perform
these and other SQL/MP operations.
Creating an Audited SQL/MP Object
On SQL/MP systems, you can create audited or nonaudited tables, views, or indexes
by using the SQLCI CREATE statements CREATE TABLE, CREATE INDEX, and
CREATE VIEW. These statements can either be embedded within host-language
programs or be executed through the SQL conversational interface, SQLCI. (These
same commands are also available on SQL/MX systems, but they always result in
audited objects on those systems.)
For SQL/MP, the default AUDIT attribute setting is AUDIT, which automatically creates
audited tables. The AUDIT attribute of indexes and views is the same as that of the
underlying table.
You can create 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.
If an SQL table is audited, all associated views and indexes are also automatically
audited. Likewise, if the primary partition of a partitioned table is audited, all secondary
partitions of the table are also automatically audited.
If you use the TMF file recovery feature, make an online dump of a newly created
table: the file recovery process cannot recover a table unless at least one online dump
of the table has been made. Any dependent objects (such as indexes and views) are
not automatically dumped with the table; you must dump these dependent objects
separately if you want them to be recoverable.
Altering the AUDIT Attribute of an SQL/MP Object
You can alter the AUDIT attribute of a table by using the SQLCI ALTER TABLE
statement. This statement can either be embedded within host-language programs or
be executed through the SQL conversational interface.
Note. Remember: the detailed operations described in this subsection apply to SQL/MP only,
and not to SQL/MX.
Caution. The audited SQL catalog contains definitions for all associated objects. TMF does
not integrate the definitions in this catalog with recovered objects themselves. When a
recovery is complete, you must update the catalog definitions to match any recovered objects.