Skip Headers

Oracle® Database Advanced Replication Management API Reference
10g Release 1 (10.1)

Part Number B10733-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to current chapter
Up
Go to next page
Next
View PDF

PURGE Function

This function purges pushed transactions from the deferred transaction queue at your current master site or materialized view site.

Syntax

DBMS_DEFER_SYS.PURGE (
   purge_method         IN  BINARY_INTEGER := purge_method_quick,
   rollback_segment     IN  VARCHAR2       := NULL,
   startup_seconds      IN  BINARY_INTEGER := 0,
   execution_seconds    IN  BINARY_INTEGER := seconds_infinity,
   delay_seconds        IN  BINARY_INTEGER := 0,
   transaction_count    IN  BINARY_INTEGER := transactions_infinity,
   write_trace          IN  BOOLEAN        := NULL);
  RETURN BINARY_INTEGER;

Parameters

Table 14-18 PURGE Function Parameters  
Parameter Description
purge_method

Controls how to purge the deferred transaction queue: purge_method_quick costs less, while purge_method_precise offers better precision.

Specify the following for this parameter to use purge_method_quick:

dbms_defer_sys.purge_method_quick

Specify the following for this parameter to user purge_method_precise:

dbms_defer_sys.purge_method_precise

If you use purge_method_quick, deferred transactions and deferred procedure calls that have been successfully pushed may remain in the DEFTRAN and DEFCALL data dictionary views for longer than expected before they are purged. See "Usage Notes" for more information.

rollback_segment

Name of rollback segment to use for the purge, or NULL for default.

startup_seconds

Maximum number of seconds to wait for a previous purge of the same deferred transaction queue.

execution_seconds

If > 0, then stop purge cleanly after the specified number of seconds of real time.

delay_seconds

Stop purge cleanly after the deferred transaction queue has no transactions to purge for delay_seconds.

transaction_count

If > 0, then shut down cleanly after purging transaction_count number of transactions.

write_trace

When set to true, Oracle records the result value returned by the PURGE function in the server's trace file. When set to false, Oracle does not record the result value.

Returns

Table 14-19 Purge Function Returns  
Value Description
result_ok

OK, terminated after delay_seconds expired.

result_startup_seconds

Terminated by lock timeout while starting.

result_execution_seconds

Terminated by exceeding execution_seconds.

result_transaction_count

Terminated by exceeding transaction_count.

result_errors

Terminated after errors.

result_split_del_order_limit

Terminated after failing to acquire the enqueue in exclusive mode. If you receive this return code, then retry the purge. If the problem persists, then contact Oracle Support Services.

result_purge_disabled

Queue purging is disabled internally for synchronization when adding new master sites without quiesce.

Exceptions

Table 14-20 PURGE Function Exceptions  
Exception Description
argoutofrange

Parameter value is out of a valid range.

executiondisabled

Execution of purging is disabled.

defererror

Internal error.

Usage Notes

When you use the purge_method_quick for the purge_method parameter in the DBMS_DEFER_SYS.PURGE function, deferred transactions and deferred procedure calls may remain in the DEFCALL and DEFTRAN data dictionary views after they have been successfully pushed. This behavior occurs in replication environments that have more than one database link and the push is executed to only one database link.

To purge the deferred transactions and deferred procedure calls, perform one of the following actions: