SQL/MP Reference Manual

HP NonStop SQL/MP Reference Manual523352-013
D-66
Example—DROP
You cannot drop an SQL-program Guardian file within a user-defined transaction.
(You can use the OSS unlink command to delete an SQL-program OSS file within
a user-defined transaction, but the operation is not performed as part of the
transaction.)
If SMF is installed on your node, the object to drop must have either a virtual or
direct name.
This restriction does not apply to DROP CONSTRAINT.
Example—DROP
This example drops an index on the PARTS table and then drops the table and a
related program:
DROP INDEX $VOL1.SALES.XPARTDES;
DROP TABLE $VOL1.SALES.PARTS;
DROP PROGRAM $VOL3.SUBVOL3.PROGA;
DROP SYSTEM CATALOG Command
DROP SYSTEM CATALOG is an SQLCI command that allows the local super ID to
delete the system catalog, including the CATALOGS table and information about the
SQLCI2 program.
catalog-name
identifies the system catalog to be dropped; catalog-name is the name of the
volume and subvolume that contain the system catalog (or an equivalent DEFINE).
If SMF is installed on your node, the system catalog must have either a virtual or
direct name.
Considerations—DROP SYSTEM CATALOG
To drop the system catalog, you must use the local super ID.
The system catalog must be empty except for the system catalog entry in the
CATALOGS table and entries for the catalog tables and the SQLCI2 program. The
system catalog must be the only catalog registered in the CATALOGS table. You
must drop all other objects, programs, and catalogs before executing this
command.
If you are running SQLCI and have not entered any SQLCI commands during the
current session, you can drop the system catalog by entering this command at the
SQLCI prompt:
>> DROP SYSTEM CATALOG catalog-name;
DROP SYSTEM CATALOG catalog-name ;