NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
D-61
Considerations—DROP
INDEX index
specifies the name (or an equivalent DEFINE) of an index to delete. index cannot
be a catalog index.
PROGRAM file
specifies the name (or an equivalent DEFINE) of a Guardian file that contains an
SQL program.
TABLE table
specifies the name (or an equivalent DEFINE) of a table to delete. table cannot be
a catalog table.
VIEW view
specifies the name (or an equivalent DEFINE) of a view to delete.
Considerations—DROP
Authorization requirements
DROP requires authority to read and write to the catalog that describes the object,
and to read and write to the catalogs of related objects that require changes because
of the drop. In addition, you cannot drop an object until after the time and date
specified for the NOPURGEUNTIL attribute of the object.
To drop a table, view, or program, you must also have authority to purge the object
being dropped. To drop a partitioned object, all partitions must be accessible.
Additional requirements for dropping other types of objects are described later in
this entry.
Only one DDL statement can operate on a given SQL object (or partition of an SQL
object) at a time. An error occurs if you attempt to execute a DROP statement while
another process is executing a DDL operation on the same object. The specific error
depends on the DDL operation involved and the phase of the operation at which the
conflict occurs. (See DDL (Data Definition Language) Statements
on page D-19 for
more information.)
Dropping a catalog
You cannot drop a catalog unless you first drop all user tables, views (except for
views defined on catalog tables), indexes, collations, and program files from the
catalog. To drop a catalog, you must have authority to read and purge the catalog
tables, and authority to read and write to SQL.CATALOGS.
Dropping a collation
WARNING. It is legal to DROP an open table, if you have PURGE authority, there are no locks
outstanding on the table, and if you are beyond the NOPURGEUNTIL date.
To adequately protect important tables, use the NOPURGEUNTIL attribute, specifying a date
well into the future, or change PURGE authority to “-” (SUPER only). Either method requires an
ALTER TABLE prior to the DROP TABLE.