SQL/MX 3.2.1 Management Manual (H06.26+, J06.15+)

Guidelines for Dropping Partitions
You can drop table and index partitions within these guidelines:
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” (page 239) 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” (page 184).
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.
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.
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.
NOTE: Unlike the DROP statement, PURGEDATA does not remove the file label.
For more information, see “Using PURGEDATA to Delete Data From Tables” (page 210)
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.
The RESTRICT option, by default, will not allow a schema to be dropped if the schema is not empty
of specifications for dependent objects. However, the CASCADE option, if specified, will drop
both the schema and any such dependent objects.
NOTE: The CASCADE option causes all objects within the specified schema to be dropped as
well as the schema itself.
Dropping Objects From an SQL/MX Database 173