Previous Topic: Manually Run a PurgeNext Topic: Customize Your Partitioning Scheme


If a Purge Fails to Complete

If a partition-based purge fails to complete (for example, when using a third party scheduler), be aware of the following:

Manually re-enable the key constraints

If a purge fails to complete, we recommend that you manually re-enable key constraints. To do this, execute the relevant following procedures in the wgn_partition_util package:

wgn_enable_pk_constraints (log_progress BOOLEAN:=TRUE);
wgn_enable_fk_constraints (log_progress BOOLEAN:=TRUE);

For example, run the following command to enable the primary and foreign key constraints respectively.

begin 
wgn_partition_util.
wgn_enable_fk_constraints;
wgn_partition_util.
wgn_enable_fk_constraints;
end;
Customize the ‘on failure’ procedure

If a purge fails, the wgn_on_stmt_fail procedure is invoked immediately, see Customizable SQL statement procedures. This procedure is designed to be customizable, allowing you to implement a mechanism to notify your DBA (for example, by pager or email) about the purge failure.

You customize wgn_on_stmt_fail in the package body of wgn_partition_cust.

More information:

Customizable SQL Statement Procedures