TMF Operations and Recovery Guide (G06.26+)
Managing SQL Objects
HP NonStop TMF Operations and Recovery Guide—522417-003
C-7
Operations for Both SQL/MP and SQL/MX
on page C-2, while SQL/MP objects can be created as either audited objects or
nonaudited objects, SQL/MX objects are always audited.
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 SQL/MP) or the catalog and schema (in SQL/MX) in which the table is
registered is enabled for TMF transaction processing. In addition, to create a table in
SQL/MX, you must either own the table’s schema or be a super ID user acting on
behalf of the owner.
If you use the TMF file-recovery feature, make an online dump of all Guardian files
associated with a newly created table: the file-recovery process cannot recover these
items unless at least one online dump of them has been made. (In SQL/MX, to return
a list of these items and their underlying Guardian file names, you can use the
MXGNAMES utility, described in the SQL/MX Reference Manual.) 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.
Duplicating an SQL Object
To duplicate one audited object to another audited object, enter the DUP command
from the SQL conversational interface. If you use the TMF file-recovery feature, you
should make an online dump of the new object.
You cannot duplicate an audited table within a user-defined TMF transaction; if you
attempt to do so, you will receive an SQL error.
Purging or Dropping an SQL Object
To purge audited tables, views, or indexes, use the PURGE command (available only
in SQL/MP) or the DROP statement from the SQL conversational interface. To purge a
schema (available only in SQL/MX) or a catalog, use the DROP statement from this
interface.
You can purge an SQL object only when TMF is active, the disk volume that contains
the object is enabled for TMF transaction processing, and the disk volume that
Caution. The audited SQL catalog contains definitions for all associated objects. TMF does
not integrate the definitions in this catalog with the recovered objects themselves. Be sure to
recreate the catalog definitions before performing a recovery; (normally, this is only an issue
when recovering a dropped object). See the discussion “Responding to Accidental Loss of an
Audited SQL/MP Object” in the SQL/MP Installation and Management Guide, or “Responding
to Accidental Loss of an Audited SQL/MX Object” in the SQL/MX Installation and Management
Guide.
When you create an online dump, to prevent it from being purged when an object is dropped,
ensure that the online dump contains partitions from multiple database tables. You should
never create an online dump that contains all the partitions of a single table and no partitions
from any other table. If you do not follow this practice, you will be unable to use TMF to
recover accidentally dropped database tables.