Configure Goldengate DDL Replication

How to Configure Goldengate DDL Replication?

Goldengate supports the replication of DDL commands, operating at a schema level, from one database to another.

By default the DDL replication is disabled on the source database (extract side) but is enabled on the target Database (replicat side). Learn more on how to configure Goldengate DDL Replication.

Configure Goldengate DDL Replication
Prerequisite Setup

Navigate to the directory where the Oracle Goldengate software is installed.

Connect to the Oracle database as sysdba.

sqlplus sys/password as sysdba

For DDL synchronization setup, run the marker_setup.sql script. Provide OGG_USER schema name, when prompted.

Here the OGG_USER is the name of the database user, assigned to support DDL replication feature in Oracle Goldengate

SQL> @marker_setup.sql

Then run the ddl_setup.sql script. Provide the setup detail information below.

SQL> @ddl_setup.sql

For 10g:

Schema Name : OGG_USER
Installation mode : initialsetup
To proceed with the installation : yes

For 11g:

Start the installation : yes
Schema Name : OGG_USER
Installation mode : initialsetup

For 12c:

In Oracle database 12c, DDL replication does not require any setup of triggers as it is natively supported at the database level.

So none of the marker, ddl_setup or any of the other scripts need to be run. All that is required is including the “DDL INCLUDE MAPPED” parameter in the Extract parameter file as shown in the last step.

Run the role_setup.sql script. Provide OGG_USER schema name, when prompted.

SQL> @role_setup.sql
Then grant the ggs_ggsuser_role to the OGG_USER.

SQL> grant ggs_ggsuser_role to OGG_USER;
Run the ddl_enable.sql script as shown in below command:

SQL> @ddl_enable;
Run the ddl_pin.sql script as shown below.

SQL> @ddl_pin OGG_USER;

Configure Extract Process with DDL Replication

The following extract ESRC01 was configured previously. Adding “DDL INCLUDE MAPPED” enables extracting the DDL which ran in the database. Here the “MAPPED .. TABLE” are all tables specified in [schema_name].*.

On restart of the ESRC01 process all DDL on the speicfied tables will be picked up and placed in the trail file for applying to the destination database.

EXTTRAIL ./dirdat/st

Don’t forget to add DDL INCLUDE MAPPED in the Pump and Replicat processes.

  • December 27, 2017 | 22 views
  • Comments