SQL/MX 2.x Installation and Management Guide (H06.10+, J06.03+)
Adding, Altering, and Dropping SQL/MX Database
Objects
HP NonStop SQL/MX Installation and Management Guide—544536-007
9-32
Dropping Schemas
•
If you plan to use the TMF subsystem for recovering a table or index, see
Recovering Database Objects on page 12-7 before proceeding.
For more information, see the SQL/MX Reference Manual.
Steps for Dropping a Partition
See Using MODIFY to Manage Table and Index Partitions on page 10-10.
Example of Dropping a Partition
The following example drops an empty partition of a range-partitioned table:
>>MODIFY TABLE CAT.SALES.CUSTOMER
+> DROP PARTITION
+> WHERE LOCATION $VOL5;
--- SQL operation complete.
Deleting Data from Partitions
To drop only the data from a table and associated indexes, use the PURGEDATA
utility.
To drop the data from a table partition:
1. Start an MXCI session. Enter a LOG command to initiate a log file for statements
and commands entered in this session. Keep the log for your records.
2. Determine the name of the table from which you want to drop the partition data.
3. Use the PURGEDATA utility to drop the data from the partition.
For more information, see Using PURGEDATA to Delete Data From Tables on
page 10-45
Dropping Schemas
Use the DROP SCHEMA statement to drop a schema.
To drop a schema successfully:
•
It must be empty unless you use the CASCADE option.
•
You must own the schema or be the super ID.
•
You must have remote passwords for any nodes to which the catalog of the
schema has been registered.
Note. You cannot use PURGEDATA to drop the data from an index partition. You can only
use PURGEDATA to drop data from partitions of tables that have no indexes, and you cannot
drop indexes separately from tables.
Note. Unlike the DROP statement, PURGEDATA does not remove the file label.










