NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
A-49
Considerations—APPEND
If it is not partitioned, a key-sequenced target table is unavailable to applications
during the APPEND operation. If the table is partitioned and you do not specify
PARTONLY, the partition into which the first new row was added and all subsequent
partitions are unavailable. The whole table is unavailable for a short time at the start
of APPEND, so this is not really an online operation. If you do specify PARTONLY,
only the partition to which APPEND adds data is unavailable during the APPEND
operation.
To append data to several partly-full partitions of a table, execute an APPEND
PARTONLY command for each partition, giving each its own input file.
Recovery files
A recovery file contains information needed to restore the target table to its original
state if the APPEND operation fails. Before appending any data to a table or table
partition, APPEND checks for the presence of a recovery file. If the file does not
exist or exists but contains incomplete recovery data, the APPEND command
executes normally, as described following. If the file exists and contains recovery
data or is not a recovery file, APPEND fails. In the normal case, APPEND executes
as follows:
°
Creates a new recovery-file
°
Gathers information about the current state of out-file
°
Writes this information to recovery-file
°
Appends data from in-file to out-file
°
Purges recovery-file in the following situations:
°
The APPEND operation completes successfully
°
The APPEND operation terminates with an error but APPEND successfully
restores the target table to its original state
Unsuccessful termination
The APPEND operation can terminate without completing its task under two
general conditions:
°
An error causes the APPEND operation to terminate gracefully.
If the APPEND operation terminates with an error, it attempts to use the
recovery information in recovery-file to restore the target table to its
original state (that is, the state the table was in before the APPEND operation
was started). If APPEND succeeds in restoring the target table to its initial state,
the APPEND operation purges recovery-file.
In this case, the APPEND operation did not successfully complete, and no
recovery-file exists. Thus, the absence of recovery-file after an
APPEND operation does not always mean that the operation was successful. To
determine if the APPEND operation succeeded, check the SQLCI listing to see
if error messages occurred.