17. Deferred Transactions and Remote Procedure Calls
Contents:
Oracle's advanced replication option relies primarily on deferred transactions and remote procedure calls (RPCs). When you commit a transaction against a replicated table, for example, the replication support triggers queue a deferred transaction to do your bidding in one or more remote databases. In addition to providing many of the underpinnings for the advanced replication option, the packages used to create and manipulate deferred calls are available for direct use in your applications. You will use the packages described in this chapter for deferred transactions and RPCs.
17.1 About Deferred Transactions and RPCsThis section provides some basic information you'll find useful in using the packages described in this chapter. 17.1.1 About Remote DestinationsEvery remote procedure call has to be executed somewhere , and Oracle offers several methods of specifying where. If you are using the advanced replication option, you have implicitly named the destinations for deferred RPCs and transactions by creating master sites. Whenever a user performs DML on a table, the transaction is applied locally and is queued for delivery to all other sites where the table is replicated; these sites are listed in the DBA_REPSITES data dictionary view. Similarly, replicated procedure calls are also queued for all master sites in the replicated environment. Refer to Chapter 15, Advanced Replication , for details on using DBMS_REPCAT, which performs most replicated environment administration operations. If you are not using the advanced replication option, then the destination site(s) are determined by one of the following means, listed in order of precedence:
If Oracle cannot determine a call's destination by any of these methods, or if you specify differing destinations in the DBMS_DEFER.TRANSACTION and DBMS_DEFER.CALL procedures, the deferred call will raise an exception. 17.1.2 Data Dictionary ViewsThere are eight data dictionary views (see Table 17.1 ) that contain data about deferred transactions and RPCs. You can query these views to determine information such as the destination of RPC calls, error messages, and scheduled execution times. Most of the packages associated with deferred calls reference and/or modify the data in these views. Tables 17-2 through 17-9 provide details about the contents of these views.
Copyright (c) 2000 O'Reilly & Associates. All rights reserved. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|