|Oracle9i Replication Management API Reference
Release 2 (9.2)
Part Number A96568-01
All installations of Advanced Replication include the replication management application programming interface (API). This replication management API is a collection of PL/SQL packages that administrators use to configure and manage replication features at each site. The Replication Management tool in Oracle Enterprise Manager also uses the procedures and functions of each site's replication management API to perform work.
This chapter contains the following topics:
Some of the PL/SQL procedures and functions described in the chapters in this part are overloaded. That is, two or more procedures or functions have the same name in a single package, but their formal parameters differ in number, order, or datatype family. When a procedure or function is overloaded, it is noted in the description. See the PL/SQL User's Guide and Reference for more information about overloading and for more information about PL/SQL in general.
To use Oracle's replication management API, you issue procedure or function calls using a query tool such as SQL*Plus or Enterprise Manager SQL Worksheet. For example, the following call to the
CREATE_MASTER_REPOBJECT procedure creates a new replicated table
hr.employees in the
hr_repg replication group:
BEGIN DBMS_REPCAT.CREATE_MASTER_REPOBJECT ( gname => 'hr_repg', type => 'TABLE', oname => 'employees', sname => 'hr', use_existing_object => TRUE, copy_rows => FALSE); END; /
To call a replication management API function, you must provide an environment to receive the return value of the function. For example, the following anonymous PL/SQL block calls the
DISABLED function in an
BEGIN IF DBMS_DEFER_SYS.DISABLED ('inst2') THEN DBMS_OUTPUT.PUT_LINE('Propagation to INST2 is disabled.'); ELSE DBMS_OUTPUT.PUT_LINE('Propagation to INST2 is enabled.'); END IF; END; /
For many procedures and functions in the replication management API, there are important issues to consider. For example:
The Replication Management tool uses the replication management API to perform most of its functions. Using the Replication Management tool is much more convenient than issuing replication management API calls individually because the utility:
An easy way to learn how to use Oracle's replication management API is to use the Replication Management tool's scripting feature. When you start an administrative session with the Replication Management tool, turn scripting on. When you are finished, turn scripting off and then review the script file. The script file contains all replication management API calls that were made during the session. See the Replication Management tool's help for more information about its scripting feature.
Many of the datetime and interval datatypes have names that are too long to be used with the procedures and functions in the replication management API. Therefore, you must use abbreviations for these datatypes instead of the full names. The following table lists each datatype and its abbreviation. No abbreviation is necessary for the
For example, if you want to use the
_ARG function to determine the value of a
ZONE argument in a deferred call, then you substitute
datatype. Therefore, you run the