NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
P-37
Considerations—PURGEDATA
[ NO ] LISTALL
specifies whether to list the name of each cleared object.
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
Authorization requirements
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.
Limitations
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, and cannot clear data from any individual partition but the last
one in an SQL table with a relative or entry-sequenced file organization.
TMF transactions and recovery for audited files
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 prior to the PURGEDATA operation.
Breaks and failures