Oracle GoldenGate 19c Non CDB to PDB Replication Setup

Oracle GoldenGate 19c Unidirectional Replication from Non-CDB to PDB: A Comprehensive Guide

As businesses continue to grow and evolve, the need for efficient data replication and integration becomes increasingly important. One popular solution for achieving this is Oracle GoldenGate, a software tool that enables real-time data integration and replication across various databases. In this article, we will explore the process of setting up unidirectional replication from a non-CDB (Container Database) to a PDB (Pluggable Database) using Oracle GoldenGate 19c.

Understanding the Architecture

<p@Before we dive into the setup process, it’s essential to understand the architecture of Oracle GoldenGate and the components involved. Oracle GoldenGate consists of three primary components:

  • Extract: Responsible for capturing data changes from the source database.
  • Pump: Transfers the captured data from the source database to the target database.
  • Replicat: Applies the captured data to the target database.

Prerequisites and Requirements

To set up unidirectional replication from a non-CDB to a PDB using Oracle GoldenGate 19c, the following prerequisites and requirements must be met:

  • Oracle Database 19c or later.
  • Oracle GoldenGate 19c or later.
  • A non-CDB source database and a PDB target database.
  • Proper network connectivity between the source and target databases.

Configuring the Source Database (Non-CDB)

The first step in setting up unidirectional replication is to configure the source database (non-CDB). This involves:

  • Enabling supplemental logging.
  • Creating a GoldenGate administrator user.
  • Granting necessary privileges to the GoldenGate administrator user.

ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
CREATE USER ggate_admin IDENTIFIED BY "password";
GRANT SELECT ANY TABLE, EXECUTE ON SYS.DBMS_LOGMNR TO ggate_admin;
GRANT CREATE SESSION, ALTER SESSION, CREATE PROCEDURE, ALTER ANY PROCEDURE, CREATE TABLE, ALTER ANY TABLE TO ggate_admin;

Configuring the Target Database (PDB)

Next, configure the target database (PDB) by:

  • Creating a GoldenGate administrator user.
  • Granting necessary privileges to the GoldenGate administrator user.
  • Enabling supplemental logging.

CREATE USER ggate_admin IDENTIFIED BY "password";
GRANT SELECT ANY TABLE, EXECUTE ON SYS.DBMS_LOGMNR TO ggate_admin;
GRANT CREATE SESSION, ALTER SESSION, CREATE PROCEDURE, ALTER ANY PROCEDURE, CREATE TABLE, ALTER ANY TABLE TO ggate_admin;
ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;

Configuring Oracle GoldenGate

With the source and target databases configured, it’s time to set up Oracle GoldenGate. This involves:

  • Creating a manager parameter file.
  • Creating a data pump parameter file.
  • Creating a replicat parameter file.

# Manager parameter file (mgr.prm)
PORT 7809
DYNAMICPORTLIST 7840-7849
CHECKPOINTSECS 180
# Data pump parameter file (dp.prm)
EXTRACT dp01
USERID ggate_admin, PASSWORD “password”
RMTHOST hostname, MGRPORT 7809
RMTTRAIL target_dirdat
TABLES (schema_name.table_name);

# Replicat parameter file (rep.prm)
REPLICAT rep01
USERID ggate_admin, PASSWORD “password”
SOURCEDEFS target_dirdat
MAP schema_name.table_name, TARGET schema_name.table_name;

Starting the Oracle GoldenGate Process

With the configuration files created, it’s time to start the Oracle GoldenGate process:

  • Start the manager.
  • Start the extract.
  • Start the data pump.
  • Start the replicat.

$ ./ggsci
START MGR
START EXTRACT dp01
START datapump dp01
START REPLICAT rep01

Once the process has started, you can verify the replication by checking the GoldenGate logs and performing a data insert on the source database.

Conclusion

Setting up unidirectional replication from a non-CDB to a PDB using Oracle GoldenGate 19c involves configuring the source and target databases, creating configuration files, and starting the Oracle GoldenGate process. By following this guide, you can ensure a smooth replication process and maintain data consistency across your databases.

If you’re looking for expert assistance with Oracle GoldenGate implementation or other related services, consider reaching out to PersonIT for guidance and support.

Leave A Comment

All fields marked with an asterisk (*) are required

plugins premium WordPress