SQL/MP Reference Manual

HP NonStop SQL/MP Reference Manual523352-013
P-38
Considerations—PURGEDATA
LISTALL is the default. If you specify NO LISTALL, PURGEDATA suppresses the
display.
PARTONLY
specifies that data should be cleared from individual partitions included in
qualified-fileset-list.
An individual partition to be cleared cannot be part of an SQL table with dependent
indexes. In addition, if the partition belongs to an SQL table with a relative or
entry-sequenced file organization, it must be the last partition in the file. (Neither of
these restrictions applies to Enscribe files.)
Considerations—PURGEDATA
To use PURGEDATA, you must have write authority for the affected tables and
files. For SQL tables or partitions, you must also have authority to read and write to
the affected catalogs.
PURGEDATA cannot clear data from SQL program files, views, collations, or
catalog tables.
You cannot use PURGEDATA to clear data directly from an SQL index.
(PURGEDATA automatically clears the appropriate indexes when you ask it to
clear an SQL table.)
PURGEDATA cannot clear data from an individual partition of an SQL table with
dependent indexes. It also cannot clear data from any individual partition but the
last one in an SQL table with a relative or entry-sequenced file organization.
You cannot use PURGEDATA within a user-defined TMF transaction.
SQL does not start a transaction for the entire PURGEDATA operation, but does
start a transaction for the portion of the operation that involves changes to file
labels and catalogs. As a result, you cannot roll back a PURGEDATA operation,
but the consistency of the file labels and catalog entries is protected by TMF.
You can use TMF to recover an audited table or file cleared by PURGEDATA if you
have recent online dumps of the table or file and you know the time the table was
cleared. Use a TMFCOM RECOVER FILES command with TIME set to a value
just before the PURGEDATA operation.
After pressing the Break key, you can restart a PURGEDATA operation by
reentering the same command. This sequence is permissible:
>> PURGEDATA *.*.* FROM CATALOG $VOL1.SUBV1;
>> (press the Break key)
>> PURGEDATA *.*.* FROM CATALOG $VOL1.SUBV1;
You could also use FC to reenter the PURGEDATA command.
PURGEDATA operations that involve many partitions, especially remote partitions,
can often cause many occurrences of error 73 (The disk file or record is locked) or