Skip Headers
Oracle® Database Advanced Replication Management API Reference
11g Release 2 (11.2)

Part Number E10707-04
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
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

11 Introduction to the Replication Management API Reference

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 Advanced Replication interface in Oracle Enterprise Manager also uses the procedures and functions of each site's replication management API to perform work.

This chapter contains these topics:

Note:

Some 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 data type family. When a procedure or function is overloaded, it is noted in the description. See the Oracle Database PL/SQL Language Reference for more information about overloading and for more information about PL/SQL in general.

Examples of Using Oracle's Replication Management API

To use Oracle's replication management API, you issue procedure or function calls using a query tool such as SQL*Plus. For example, the following call to the DBMS_REPCAT.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 DBMS_DEFER_SYS.DISABLED function in an IF statement.

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;
/

Issues to Consider When Using the Replication Management API

For many procedures and functions in the replication management API, there are important issues to consider. For example:

The Advanced Replication Interface and the Replication Management API

The Advanced Replication interface in Oracle Enterprise Manager uses the replication management API to perform most of its functions. Using the Advanced Replication interface is much more convenient than issuing replication management API calls individually because the utility:

Abbreviations for Datetime and Interval Data Types

Many of the datetime and interval data types 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 data types instead of the full names. The following table lists each data type and its abbreviation. No abbreviation is necessary for the DATE and TIMESTAMP data types.

Data Type Abbreviation
TIMESTAMP WITH TIME ZONE TSTZ
TIMESTAMP LOCAL TIME ZONE TSLTZ
INTERVAL YEAR TO MONTH IYM
INTERVAL DAY TO SECOND IDS

For example, to use the DBMS_DEFER_QUERY.GET_datatype_ARG function to determine the value of a TIMESTAMP LOCAL TIME ZONE argument in a deferred call, substitute TSLTZ for datatype. Therefore, you run the DBMS_DEFER_QUERY.GET_TSLTZ_ARG function.