NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
C-19
CLEANUP Command
The following two examples use a table created as follows:
CREATE TABLE EMPLOYEE (EMPNAME CHAR(20),
ADDRESS VARCHAR(100));
INSERT INTO EMPLOYEE VALUES ("Robert Smith",
"19333 Vallco Parkway ");
The following example returns 20:
CHAR_LENGTH ( EMPNAME )
The following example returns 21—not 100—because it is a VARCHAR value:
CHAR_LENGTH ( ADDRESS )
CLEANUP Command
CLEANUP is an SQLCI utility command that allows a user with super ID authority to
delete damaged SQL objects, SQL programs in Guardian files, and catalogs and
associated file labels and shadow labels from the local node.
qualified-fileset-list
is a qualified fileset list that specifies SQL objects to delete. (See Qualified Fileset
List on page Q-1 for details.) If ServerWare Storage Management Foundation
(SMF) is installed, qualified-fileset-list cannot specify a file on a
$*.ZYS*. subvolume.
CLEANUP does not delete catalog tables and indexes included in qualified-
fileset-list unless you also specify the CATALOG[S] option. CLEANUP
does not delete Enscribe files other than SQL programs. CLEANUP does not delete
OSS files, even if they contain SQL programs.
If an object's file label no longer exists, you can use the FROM CATALOG clause to
specify the object, but you cannot use a WHERE expression. If you use both,
CLEANUP issues an error message and does not delete the object.
Caution. Use CLEANUP only when absolutely necessary to delete damaged objects.
CLEANUP deletes both damaged and undamaged objects in the fileset you specify.
Misusing CLEANUP can corrupt your SQL data dictionary. Never use CLEANUP as a
substitute for DROP or PURGE.
CLEANUP [!] qualified-fileset-list [!] [ , option ] ;
{ CATALOG[S] }
option is: { NO CATALOG[S] [ , SHADOWSONLY ] }
{ SHADOWSONLY [ , NO CATALOG[S] ] }