NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
A-50
Considerations—APPEND
°
A CPU or process failure interrupts the APPEND operation so that it cannot
terminate gracefully.
If the APPEND operation is interrupted and cannot restore the target table to its
original state, it does not purge recovery-file. In this case, the target table
or partition remains unavailable to applications until some recovery is
performed.
To recover from an interrupted APPEND operation and complete the operation,
use the APPENDRESTART command. You must specify exactly the same
parameters, including the same recovery-file, as you did in the initial
APPEND command.
To recover from an interrupted APPEND operation and simply restore the target
table to its original state, use the APPENDCANCEL command. After an
APPENDCANCEL operation executes, the target table contains exactly the
same data it had before the initial APPEND operation was started. (Any new
data added by the interrupted APPEND operation is removed from the target
table.)
See APPENDRESTART Command
on page A-53 and APPENDCANCEL
Command on page A-51 for more information about these commands.
Repeating the APPEND command
If you repeat an APPEND command that terminated successfully on an entry-
sequenced table, the target table will contain duplicate data. Do not repeat an
APPEND command unless you want to create duplicate data in the target table.
APPEND versus COPY
APPEND resembles COPY in that both transfer data from an existing source to an
existing target without overwriting or erasing target data.
Following are the major differences between APPEND and COPY:
°
APPEND is faster than COPY.
°
APPEND cannot run within a user-defined TMF transaction. COPY can run
within a user-defined TMF transaction.
°
APPEND writes only to entry-sequenced and key-sequenced SQL tables. COPY
writes to all types of SQL tables as well as Enscribe files.
°
APPEND does not write to SQL tables with indexes. COPY writes to SQL
tables with indexes and automatically updates the indexes.
°
APPEND adds data only to the end of a table or partition. COPY can interleave
new rows with existing rows.
APPEND versus LOAD
APPEND resembles LOAD in that both transfer data from an existing source to an
existing target. Neither APPEND nor LOAD can run within a user-defined TMF
transaction, and both require that you turn off auditing when transferring data to an
entire table. Like LOAD, APPEND starts an external sort process to sort the data