Skip to Content
Oracle Distributed Systems
book

Oracle Distributed Systems

by Charles Dye
April 1999
Intermediate to advanced
552 pages
15h 39m
English
O'Reilly Media, Inc.
Content preview from Oracle Distributed Systems

Creating a Replicated Package Procedure

Creating a replicated package procedure is easy. Simply register an existing package as a replicated object with DBMS_REPCAT.CREATE_MASTER_REPOBJECT and then generate replication support for it. I recommend that you pre-create your packages in all master databases before registering them for replication.

Note

If your replicated procedure modifies a table that is undergoing row-level replication, you should disable replication within the procedure by calling DBMS_REPUTIL.REPLICATION_OFF before any SQL statements that perform DML on the table. Be sure to call DBMS_REPUTIL.REPLICATION_ON after these SQL statements.

To enable replicated calls to the package USERADMIN, we would make these DBMS_REPCAT calls:

EXECUTE dbms_repcat.create_master_repobject( -
sname               => 'SYSTEM', -
oname               => 'USER_ADMIN', -
type                => 'PACKAGE', -
use_existing_object => TRUE, -
retry               => FALSE, -
gname               => 'RG_SPROCKET');

EXECUTE dbms_repcat.create_master_repobject( -
sname               => 'SYSTEM', -
oname               => 'USER_ADMIN', -
type                => 'PACKAGE BODY', -
use_existing_object => TRUE, -
retry               => FALSE, -
gname               => 'RG_SPROCKET');

EXECUTE dbms_repcat.generate_replication_support( -
name            => 'SYSTEM', -
oname           => 'USER_ADMIN', -
type            => 'PACKAGE', -
package_prefix  => 'DEFER_');

EXECUTE dbms_repcat.generate_replication_support( -
sname           => 'SYSTEM', -
oname           => 'USER_ADMIN', -
type            => 'PACKAGE BODY', -
package_prefix  => 'DEFER_');

Note that we must call the CREATE_MASTER_REPOBJECT and GENERATE_REPLICATION_SUPPORT ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Expert Oracle Exadata, Second Edition

Expert Oracle Exadata, Second Edition

Martin Bach, Karl Arao, Andy Colvin, Frits Hoogland, Randy Johnson, Kerry Osborne, Tanel Poder
Expert Oracle RAC 12c

Expert Oracle RAC 12c

Syed Jaffar Hussain, Tariq Farooq, Riyaj Shamsudeen, Kai Yu

Publisher Resources

ISBN: 1565924320Supplemental ContentCatalog PageErrata