Oracle7 Server Distributed Systems Volume II: Replicated Data

Contents Index Home Previous Next

Manually Resolving an Error

Once you have determined the cause of an error, you may need to perform one or more of the following actions at the destination site after fixing the error:

There may also be times when you need to delete a transaction from the deferred transaction queue.

Re-executing a Transaction

To re-execute a deferred transaction that did not initially complete successfully, call the EXECUTE_ERROR procedure in the DBMS_DEFER_SYS package, as shown in the following example:

DBMS_DEFER_SYS.EXECUTE_ERROR(
	deferred_tran_id	=>	'234', 
	deferred_tran_db	=>	'acct_hq.hq.com', 
	destination	=>	'acct_ny.ny.com');

This example re-executes the transaction with ID number 234 that originated at the ACCT_HQ site and was queued for execution at the ACCT_NY site.

Upon successful execution, the transaction is removed from the DefError view, as well as the local deferred transaction views. Although when you call EXECUTE_ERROR you must always specify the database for which the transaction was originally queued (that is, the site where you want to re-execute a transaction), you can choose to re-execute a single transaction, all transactions originating from a given location, or all transactions, regardless of their originating location.

If you call EXECUTE_ERROR for a single transaction, that transaction is not committed, even if it completes successfully. If you are satisfied with the results of the transaction, you should issue the SQL command COMMIT WORK. If EXECUTE_ERROR re-executes multiple transactions, each transaction is committed as it completes.

Additional Information: The parameters for the EXECUTE_ERROR procedure are described in Table 12 - 24.

Deleting a Transaction from the DefError View

To delete a transaction from the DefError view, call the DELETE_ERROR procedure in the DBMS_DEFER_SYS package, as shown in the following example:

DBMS_DEFER_SYS.DELETE_ERROR(
	deferred_tran_id	=>	'234', 
	deferred_tran_db	=>	'acct_hq.hq.com', 
	destination	=>	'acct_ny.ny.com');

This example removes the transaction with ID number 234 that originated at the ACCT_HQ site and was queued for execution at the ACCT_NY site from the DefError view.

Calling DELETE_ERROR removes the specified transaction from the DefError view, as well as the local deferred transaction views. By passing null for selected arguments, you can remove all transactions associated with a particular site from the DefError view. For example, assuming that you have sites A, B, and C, you can choose to remove from the DefError view

Additional Information: The parameters for the DELETE_ERROR procedure are described in Table 12 - 18.

Deleting a Transaction from the Deferred Transaction Queue

To delete a transaction from the deferred transaction queue, call the DELETE_TRAN procedure in the DBMS_DEFER_SYS package, as shown in the following example:

DBMS_DEFER_SYS.DELETE_TRAN(
	deferred_tran_id	=>	'234', 
	deferred_tran_db	=>	'acct_hq.hq.com', 
	destination	=>	'acct_ny.ny.com');

This example deletes the transaction with ID number 234 that originated at the ACCT_HQ site and was queued for execution at the ACCT_NY site.

Calling DELETE_TRAN removes the transaction from the queue for the destination database. If you do not specify a destination database, the transaction is removed from the queues for all destinations. For example, assuming that you have sites A, B, and C you can choose to delete:

After Oracle deletes a transaction, if the transaction is not queued for any other destinations, Oracle removes the appropriate entries from the DefTran and DefCall views as well.

Additional Information: The parameters for the DELETE_TRAN procedure are described in Table 12 - 19.


Contents Index Home Previous Next