Oracle8i Supplied PL/SQL Packages Reference Release 2 (8.1.6) Part Number A76936-01 |
|
DBMS_DEFER_SYS, 2 of 2
Subprogram | Description |
---|---|
ADD_DEFAULT_DEST Procedure |
Adds a destination database to the |
DELETE_DEFAULT_DEST Procedure |
Removes a destination database from the |
DELETE_DEF_DESTINATION Procedure |
Removes a destination database from the |
DELETE_ERROR Procedure |
Deletes a transaction from the |
DELETE_TRAN Procedure |
Deletes a transaction from the |
DISABLED Function |
Determines whether propagation of the deferred transaction queue from the current site to a specified site is enabled. |
EXCLUDE_PUSH Procedure |
Acquires an exclusive lock that prevents deferred transaction |
EXECUTE_ERROR Procedure |
Re-executes a deferred transaction that did not initially complete successfully in the security context of the original receiver of the transaction. |
EXECUTE_ERROR_AS_USER Procedure |
Re-executes a deferred transaction that did not initially complete successfully in the security context of the user who executes this procedure. |
PURGE Function |
Purges pushed transactions from the deferred transaction queue at your current master or snapshot site. |
PUSH Function |
Forces a deferred remote procedure call queue at your current master or snapshot site to be pushed to another master site. |
REGISTER_PROPAGATOR Procedure |
Registers the specified user as the propagator for the local database. |
SCHEDULE_PURGE Procedure |
Schedules a job to purge pushed transactions from the deferred transaction queue at your current master or snapshot site. |
SCHEDULE_PUSH Procedure |
Schedules a job to push the deferred transaction queue to a remote master destination. |
SET_DISABLED Procedure |
Disables or enables propagation of the deferred transaction queue from the current site to a specified destination site. |
UNREGISTER_PROPAGATOR Procedure |
Unregisters a user as the propagator from the local database. |
UNSCHEDULE_PURGE Procedure |
Stops automatic purges of pushed transactions from the deferred transaction queue at a snapshot or master site. |
UNSCHEDULE_PUSH Procedure |
Stops automatic pushes of the deferred transaction queue from a snapshot or master site to another master site. |
This procedure adds a destination database to the DEFDEFAULTDEST
view.
DBMS_DEFER_SYS.ADD_DEFAULT_DEST ( dblink IN VARCHAR2);
Parameter | Description |
---|---|
dblink |
The fully qualified database name of the node that you want to add to the |
Exception | Description |
---|---|
ORA-23352 |
The |
This procedure removes a destination database from the DEFDEFAULTDEST
view.
DBMS_DEFER_SYS.DELETE_DEFAULT_DEST ( dblink IN VARCHAR2);
This procedure removes a destination database from the DEFSCHEDULE
view.
DBMS_DEFER_SYS.DELETE_DEF_DESTINATION ( destination IN VARCHAR2, force IN BOOLEAN := FALSE);
This procedure deletes a transaction from the DEFERROR
view.
DBMS_DEFER_SYS.DELETE_ERROR( deferred_tran_id IN VARCHAR2, destination IN VARCHAR2);
This procedure deletes a transaction from the DEFTRANDEST
view. If there are no other DEFTRANDEST
or DEFERROR
entries for the transaction, then the transaction is deleted from the DEFTRAN
and DEFCALL
views as well.
DBMS_DEFER_SYS.DELETE_TRAN ( deferred_tran_id IN VARCHAR2, destination IN VARCHAR2);
This function determines whether propagation of the deferred transaction queue from the current site to a specified site is enabled. The DISABLED
function returns TRUE
if the deferred remote procedure call (RPC) queue is disabled for the specified destination.
DBMS_DEFER_SYS.DISABLED ( destination IN VARCHAR2) RETURN BOOLEAN;
Parameter | Description |
---|---|
destination |
The fully qualified database name of the node whose propagation status you want to check. |
Value | Description |
---|---|
TRUE |
Propagation to this site from the current site is disabled. |
FALSE |
Propagation to this site from the current site is enabled. |
Exception | Description |
---|---|
NO_DATA_FOUND |
Specified |
This function acquires an exclusive lock that prevents deferred transaction PUSH
(either serial or parallel). This function performs a commit when acquiring the lock. The lock is acquired with RELEASE_ON_COMMIT
=>
TRUE
, so that pushing of the deferred transaction queue can resume after the next commit.
DBMS_DEFER_SYS.EXCLUDE_PUSH ( timeout IN INTEGER) RETURN INTEGER;
Value | Description |
---|---|
0 |
Success, lock acquired. |
1 |
Timeout, no lock acquired. |
2 |
Deadlock, no lock acquired. |
4 |
Already own lock. |
This procedure re-executes a deferred transaction that did not initially complete successfully in the security context of the original receiver of the transaction.
DBMS_DEFER_SYS.EXECUTE_ERROR ( deferred_tran_id IN VARCHAR2, destination IN VARCHAR2);
This procedure re-executes a deferred transaction that did not initially complete successfully. Each transaction is executed in the security context of the connected user.
DBMS_DEFER_SYS.EXECUTE_ERROR_AS_USER ( deferred_tran_id IN VARCHAR2, destination IN VARCHAR2);
This function purges pushed transactions from the deferred transaction queue at your current master or snapshot site.
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;
Parameter | Description |
---|---|
purge_method |
Controls how to purge the deferred transaction queue:
If you use |
rollback_segment |
Name of rollback segment to use for the purge, or |
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 |
transaction_count |
If > 0, then shut down cleanly after purging |
write_trace |
When set to |
Exception | Description |
---|---|
argoutofrange |
Parameter value is out of a valid range. |
executiondisabled |
Execution of purging is disabled. |
defererror |
Internal error. |
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:
purge_method_precise
for the purge_method
parameter instead of the purge_method_quick
. Using purge_method_precise
is more expensive, but it ensures that the deferred transactions and procedure calls are purged after they have been successfully pushed.
purge_method_quick
for the purge_method
parameter, push the deferred transactions to all database links. The deferred transactions and deferred procedure calls are purged efficiently when the push to the last database link is successful.
This function forces a deferred remote procedure (RPC) call queue at your current master or snapshot site to be pushed (propagated) to another master site using either serial or parallel propagation.
DBMS_DEFER_SYS.PUSH ( destination IN VARCHAR2, parallelism IN BINARY_INTEGER := 0, heap_size IN BINARY_INTEGER := 0, stop_on_error IN BOOLEAN := FALSE, write_trace IN BOOLEAN := FALSE, 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, delivery_order_limit IN NUMBER := delivery_order_infinity) RETURN BINARY_INTEGER;
This procedure registers the specified user as the propagator for the local database. It also grants to the specified user CREATE
SESSION
, CREATE
PROCEDURE
, CREATE
DATABASE
LINK
, and EXECUTE
ANY
PROCEDURE
privileges (so that the user can create wrappers).
DBMS_DEFER_SYS.REGISTER_PROPAGATOR ( username IN VARCHAR2);
Parameter | Description |
---|---|
username |
Name of the user. |
Exception | Description |
---|---|
missinguser |
Specified user does not exist. |
alreadypropagator |
Specified user is already the propagator. |
duplicatepropagator |
There is already a different propagator. |
This procedure schedules a job to purge pushed transactions from the deferred transaction queue at your current master or snapshot site. You should schedule one purge job.
DBMS_DEFER_SYS.SCHEDULE_PURGE ( interval IN VARCHAR2, next_date IN DATE, reset IN BOOLEAN := NULL, purge_method IN BINARY_INTEGER := NULL, rollback_segment IN VARCHAR2 := NULL, startup_seconds IN BINARY_INTEGER := NULL, execution_seconds IN BINARY_INTEGER := NULL, delay_seconds IN BINARY_INTEGER := NULL, transaction_count IN BINARY_INTEGER := NULL, write_trace IN BOOLEAN := NULL);
This procedure schedules a job to push the deferred transaction queue to a remote master destination. This procedure does a COMMIT
.
DBMS_DEFER_SYS.SCHEDULE_PUSH ( destination IN VARCHAR2, interval IN VARCHAR2, next_date IN DATE, reset IN BOOLEAN := FALSE, parallelism IN BINARY_INTEGER := NULL, heap_size IN BINARY_INTEGER := NULL, stop_on_error IN BOOLEAN := NULL, write_trace IN BOOLEAN := NULL, startup_seconds IN BINARY_INTEGER := NULL, execution_seconds IN BINARY_INTEGER := NULL, delay_seconds IN BINARY_INTEGER := NULL, transaction_count IN BINARY_INTEGER := NULL);
To disable or enable propagation of the deferred transaction queue from the current site to a specified destination site. If the disabled parameter is TRUE
, then the procedure disables propagation to the specified destination and future invocations of PUSH
do not push the deferred remote procedure call (RPC) queue. SET_DISABLED
eventually affects a session already pushing the queue to the specified destination, but does not affect sessions appending to the queue with DBMS_DEFER
.
If the disabled parameter is FALSE
, then the procedure enables propagation to the specified destination and, although this does not push the queue, it permits future invocations of PUSH
to push the queue to the specified destination. Whether the disabled parameter is TRUE
or FALSE
, a COMMIT
is required for the setting to take effect in other sessions.
DBMS_DEFER_SYS.SET_DISABLED ( destination IN VARCHAR2, disabled IN BOOLEAN := TRUE);
Exception | Description |
---|---|
NO_DATA_FOUND |
No entry was found in the |
To unregister a user as the propagator from the local database. This procedure:
DEFPROPAGATOR
.
REGISTER_PROPAGATOR
from the specified user (including identical privileges granted independently).
DBMS_DEFER_SYS.UNREGISTER_PROPAGATOR ( username IN VARCHAR2 timeout IN INTEGER DEFAULT DBMS_LOCK.MAXWAIT);
Parameter | Description |
---|---|
username |
Name of the propagator user. |
timeout |
Timeout in seconds. If the propagator is in use, then the procedure waits until timeout. The default is |
Parameter | Description |
---|---|
missingpropagator |
Specified user is not a propagator. |
propagator_inuse |
Propagator is in use, and thus cannot be unregistered. Try later. |
This procedure stops automatic purges of pushed transactions from the deferred transaction queue at a snapshot or master site.
DBMS_DEFER_SYS.UNSCHEDULE_PURGE();
None
This procedure stops automatic pushes of the deferred transaction queue from a snapshot or master site to another master site.
DBMS_DEFER_SYS.UNSCHEDULE_PUSH ( dblink IN VARCHAR2);
Parameter | Description |
---|---|
dblink |
Fully qualified pathname to master database site at which you want to unschedule periodic execution of deferred remote procedure calls. |
Exception | Description |
---|---|
NO_DATA_FOUND |
No entry was found in the |
|
![]() Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|