Oracle8i Replication Management API Reference Release 2 (8.1.6) Part Number A76958-01 |
|
Replication Management API Reference, 3 of 179
To use Oracle's replication management API, you issue procedure or function calls using a query tool such as an Enterprise Manager SQL Worksheet or SQL*Plus. For example, the following call to the DBMS_REPCAT
.CREATE_MASTER_REPOBJECT
procedure creates a new replicated table SALES
.EMP
in the ACCT
replication group.
DBMS_REPCAT.CREATE_MASTER_REPOBJECT( sname => 'sales', oname => 'emp', type => 'table', use_existing_object => TRUE, ddl_text => 'CREATE TABLE acct_rec.emp AS . . .', comment => 'created by . . .', retry => FALSE, copy_rows => TRUE, gname => 'acct');
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;
For many procedures and functions in the replication management API, there are important issues to consider. For example:
Oracle Replication Manager uses the replication management API to perform most of its functions. Using Replication Manager 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 Manager scripting feature. When you start an administrative session with Replication Manager, 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 Manager help documentation for more information about its scripting feature.
|
![]() Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|