Forcing Deletion of Partitions

The force keyword used at the end of the drop partition statement specifies that the source half of a partition definition should be dropped regardless of whether the target half is missing or invalid.

For example, in the following session, assume there is a partition definition between app1.source and app2.target, but the app2.target database has been dropped. An ordinary attempt to drop the partition definition fails:

MAXL> drop transparent partition app1.source to app2.target;

     OK/INFO - 1053012 - Object source is locked by user system.
     OK/INFO - 1051034 - Logging in user System.
     OK/INFO - 1051035 - Last login on Friday, January 10, 2005 2:28:09 PM.
       ERROR - 1051032 - Database target does not exist.
     OK/INFO - 1053013 - Object source unlocked by user system.
     OK/INFO - 1051037 - Logging out user system, active for 0 minutes.

In the second attempt, the force keyword allows the invalid source partition to be dropped:

MAXL> drop transparent partition app1.source to app2.target force;

   OK/INFO - 1053012 - Object source is locked by user system.
   OK/INFO - 1051034 - Logging in user System.
   OK/INFO - 1051035 - Last login on Friday, January 10, 2005 2:31:50 PM.
     ERROR - 1051032 - Database target does not exist.
   OK/INFO - 1051037 - Logging out user system, active for 0 minutes.
   OK/INFO - 1053013 - Object source unlocked by user system.
   OK/INFO - 1241125 - Partition dropped.

Note:

The force keyword only works to drop a partition definition when the source half of the partition definition remains valid. In other words, if the source database is deleted, the partition cannot be dropped from the dangling target.