SQL/MP Installation and Management Guide

Performing Recovery Operations
HP NonStop SQL/MP Installation and Management Guide523353-004
11-30
Purging Damaged Objects With the CLEANUP Utility
The CLEANUP utility, however, is specifically designed to purge a file, the file’s catalog
description, and any dependent objects, when the SQL object is damaged.
The command syntax for the CLEANUP utility is described in the SQL/MP Reference
Manual.
When using the CLEANUP utility to remove damaged objects, follow these guidelines:
Be careful when using a qualified file set or the ”!” format with the CLEANUP utility
because you might inadvertently purge valid objects.
To execute the CLEANUP utility, you must log on as the local super ID.
The local super ID does not give you authority to purge objects on a remote node.
Therefore, to purge objects distributed over multiple nodes, you must run the
CLEANUP utility separately on each node.
You cannot specify the CATALOGS option (for purging catalogs) and the
SHADOWSONLY option (to enable or disable removal of shadow labels) in the
same CLEANUP command.
If the CLEANUP utility is used on a distributed database table, view, or index that
has partitions or remote dependent objects, the remaining objects and the catalogs
in which they are registered can still contain references to the objects purged with
the CLEANUP utility. This situation is most likely in the case of a network-
distributed object because the CLEANUP utility affects objects on the local node
only. Be sure you remove the entire structure of a distributed object.
The CLEANUP utility treats the dependents of an object as individual objects and
purges them independently. Therefore, in unusual circumstances, it is possible to
run the CLEANUP utility and still have dependent objects, partitions, views, or
indexes that refer to a table that has been purged, or to be unable to apply the
CLEANUP utility to objects because they are corrupt in an unusual way. These
unusual circumstances are outlined under the discussion of the CLEANUP utility in
the SQL/MP Reference Manual. In these cases, you must use a licensed SQLCI2
process to remove the offending catalog entries, and you must use the GOAWAY
stand-alone utility to purge the disk file labels for the damaged objects.
If an SQL program is dependent on an object being purged, the CLEANUP utility
invalidates the program but does not purge it. If the program is stored in a
Guardian file and is explicitly identified for deletion in a qualified file set, however,
the CLEANUP utility purges the program. The CLEANUP utility does not purge
SQL programs stored in OSS files.
The CLEANUP utility does not transmit status information and operational results
to the system log. Information about operational results is returned through SQLCI,
however.
Caution. The CLEANUP utility purges undamaged files in addition to damaged ones. The
CLEANUP utility should never be used as a substitute for the SQL DROP statement or SQLCI
PURGE command. The CLEANUP utility should be used only for removing objects that cannot
be repaired using the TMF subsystem or removed by DROP or PURGE.