You are on page 1of 4

Oracle Goldengate

Prepare database
(V 1.0)

SARAVANAKUMAR K
Oracle GoldenGate installation document

Prerequisite Steps for Setting Up Oracle GoldenGate Data Replication:


1) Set Parameter Enable_GoldenGate_Replication to TRUE:

On both the source and target databases, ensure that the Enable_GoldenGate_Replication parameter
is set to TRUE. This parameter allows GoldenGate to function.
Login into database as sys privs:
SQL> alter system set enable_goldengate_replication=TRUE; -- [sid=‘*’]

2) Create Global User in Database 12c with prefix C##:

Create a global user with the prefix "C##" to facilitate cross-container data access in Oracle
Database 12c and higher version. In non-container you can create as per your naming standard. In
general, it is recommended to user either ggate or ggadmin and container environment it must be
prefix with c##.
For creating new database user for goldengate, we need tablespace. So firstly we need to create
tablespace, this tablespace shout present in all pluggable. After that user have to on container, if you
have container and pluggable environment. Therefore ggadmin user going to create on container

SQL> create tablespace ggadmin_tbs datafile


'/u02/app/oracle/oradata/pdb1/ggadmin_tbs001.dbf' size 100M AUTOEXTEND ON NEXT
100M MAXSIZE 5G;
SQL>create user c##ggadmin identified by oracle default tablespace ggadmin_tbs;

database.

snip

3) Grant DBA Role to This User:

On both the source and target databases, grant the DBA (Database Administrator) role to the global
user. This role provides the necessary privileges for GoldenGate.
SQL> grant dba to C##GGADMIN container=all;

2|Pa ge
Oracle GoldenGate installation document

SQL>exec dbms_goldengate_auth.grant_admin_privilege
('C##GGADMIN',container=>'all');

4) Enable Supplemental Logging (on the source database):

Enable supplemental logging to capture additional data required for GoldenGate, such as column data
changes and unique key information.

SQL>alter database add supplemental log data (all) columns;

5) Enable Database in Archive Log Mode (on the source database):

Ensure that the source database is operating in Archive Log mode. This mode is essential for
maintaining a complete and recoverable record of database changes.

First need to check current mode:

SQL> select log_mode from v$database;

If log_mode is ARCHIVELOG no action is required, else we have to change to archivelog.

Our current database is NOARCHIVELOG mode, so we need to change. For change it, we need to
bounce the db.

SQL> shutdown immediate


SQL> startup mount
SQL> alter database archivelog

3|Pa ge
Oracle GoldenGate installation document

SQL> alter database open;

Next, we have to verify whether it has been changed.

By following these steps on both the source and target databases, you will establish the necessary
prerequisites for Oracle GoldenGate replication to work effectively, allowing you to replicate data between
the two databases.

4|Pa ge

You might also like