NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
W-6
Considerations—WITH SHARED ACCESS
SQL reads catalog entries for existing objects involved in the operation (the
“source objects”) and creates any new objects for the operation with auditing
disabled. For CREATE INDEX operations, SQL also sets the
NOAUDITCOMPRESS file attribute for the table being indexed unless it is
already set. All this activity occurs in one transaction.
SQL then starts an audit fix-up process on each node that contains one or more
source objects for the operation and begins copying data from source objects to
target objects as needed. For CREATE INDEX, SQL transforms the data as
needed. All this activity occurs outside of a transaction. If EMS reporting is
turned on, the audit fix-up processes issue status messages throughout the load.
SQL starts each audit fix-up process as a named process running under the
process access ID of the user that started the WITH SHARED ACCESS
operation. However, audit fix-up processes switch to the super ID during
portions of their execution, then switch back to the initial user ID. (The audit
fix-up processes handle this change automatically, but you might notice that
these processes sometimes appear in lists of processes running under your user
ID and sometimes do not.)
After the load finishes, SQL executes a transaction that enables auditing, if it is
not already enabled, on the target objects, after which, you can take online
dumps of the target objects if necessary. (Online dumps are not necessary for
merge and move boundary requests.) If your operation uses EMS reporting, an
EMS message is issued.
2. Audit fix-up phase
The audit fix-up processes search TMF audit trails to find audit information for
the source objects and update the target objects to reflect any changes made
since the load of the corresponding records. When the updates are complete,
SQL is ready to commit the operation.
Though the target objects are audited, the changes made by the audit fix-up
processes during this phase do not occur within TMF transactions unless the
source objects have file-recovery protection (that is, if valid online dumps exist
for the source objects).
Depending on the COMMIT option in effect for the operation, SQL either
moves into the commit phase (the default), waits for the appropriate time
window in which to move into the commit phase, rolls back the operation and
terminates with an error because the time window has passed, or issues
warnings 1618 and 1619 to notify the user that the operation is ready to commit
and waits for the user to respond with a CONTINUE statement.
If the operation cannot move into the commit phase immediately (because it
must wait for a time window or a CONTINUE statement) the audit fix-up
Note. Some operations involve one source object and one target object, while others
involve many. For example, a simple move of a partition involves one source object
and one target object. However, if you create an index on a partitioned table, each
partition of the table is a source object for the operation; if the new index is itself
partitioned, each partition of the index is a target object for the operation.