SQL/MX 2.x Installation and Management Guide (G06.24+, H06.03+)

Adding, Altering, and Dropping SQL/MX Database
Objects
HP NonStop SQL/MX Installation and Management Guide523723-004
9-33
Dropping Schemas
The partition for a range-partitioned object must be empty.
All partitions must be available when you use the MODIFY utility on an SQL/MX
table or index.
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-9.
Example of Dropping a Partition
This 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-35
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.
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.