NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
C-24
CLEARONPURGE File Attribute
If $VOL1 is removed (instead of $VOL2, as in the previous example), the catalog
descriptions cannot be removed using DROP or PURGE because the tables are not
accessible. You can delete the catalog descriptions by entering the following:
>> CLEANUP ($VOL1.PERSNL.DEPT, $VOL1.PERSNL.JOB,
$VOL1.PERSNL.EMPLOYEE) FROM CATALOG $VOL2.CAT;
If the DEPT, JOB, and EMPLOYEE tables are the only SQL objects on $VOL1, you
can accomplish the same operation as follows:
>> CLEANUP $VOL1.PERSNL.* FROM CATALOG $VOL2.CAT;
CLEARONPURGE File Attribute
CLEARONPURGE is a Guardian file attribute that controls erasure of data from the
disk when a table, index, catalog, or program is purged or dropped. CLEARONPURGE
applies to key-sequenced, relative, and entry-sequenced tables and to indexes.
NO CLEARONPURGE is the default for tables, for catalogs, and for programs that are
explicitly SQL-compiled and stored in Guardian files.
The index default is the table value at index creation.
Considerations—CLEARONPURGE
Purpose of CLEARONPURGE
When you drop or purge an object with NO CLEARONPURGE, the system
deallocates disk space but does not physically destroy the data in that disk space.
This implementation improves performance by reducing writes to the disk, but when
the disk space is allocated to a new file, other users might be able to read data left by
the object that used the space previously.
CLEARONPURGE increases security for sensitive data or programs by causing the
system to overwrite deallocated disk space.
Effect within transactions
If you drop or purge a file with the CLEARONPURGE attribute from within a TMF
transaction, the data is not physically erased from the disk until after the transaction
commits.
{ CLEARONPURGE | NO CLEARONPURGE }