Sunday, January 29, 2023

Oracle GoldenGate 21c MA -- Configure Integrated Replicat for an Oracle Database

Problem

You want to configure an integrated replicat for an Oracle Database

Solution

1) Enable GoldenGate replication:

SQL> alter system set ENABLE_GOLDENGATE_REPLICATION=true scope=both sid='*';

2) Create a GoldenGate user to be used by Extract:

SQL> create user ggadmin identified by "<password>"
     default tablespace users temporary tablespace temp;

SQL> grant connect, resource, dba to ggadmin;
SQL> alter user ggadmin quota unlimited on users;

SQL> exec dbms_goldengate_auth.grant_admin_privilege('GGADMIN' );

3) Enable replication support for sequences:

4) Create replicat parameter file, the name of file should match the replicat name

OGG (https://localhost:34030 gg_inst1 as <alias>@<db>) 29> edit params <replicat_name>

REPLICAT <replicat_name>
USERIDALIAS <target_alias> DOMAIN OracleGoldenGate
ASSUMETARGETDEFS
DBOPTIONS ENABLE_INSTANTIATION_FILTERING
REPORTCOUNT EVERY 30 MINUTES, RATE
DDL INCLUDE ALL
DDLOPTIONS REPORT
SOURCECHARSET PASSTHRU
MAP <schema>.*, TARGET <schema>.*;
MAPEXCLUDE <any_mat_views>

2023-01-28T19:23:46Z  INFO    OGG-10183  Parameter file <replicat_name>.prm passed validity check.
2023-01-28T19:23:46Z  INFO    OGG-06153  FIPS 140 support has been enabled. Process 171 is using compliant shared libraries to perform encryption for the rest of its execution.

5) Create a checkpoint table:

OGG (https://localhost:34030 gg_inst1 as <alias>@<db>) 30> DBLOGIN USERIDALIAS <target_alias>
Successfully logged into database.

OGG (https://localhost:34030 gg_inst1 as <alias>@<db>) 32> ADD CHECKPOINTTABLE ggadmin.<checkpoint_table_name>

6) Add Replicat

OGG (https://localhost:34030 gg_inst1 as <alias>@<db>) 33> ADD REPLICAT <replicat_name>, INTEGRATED, EXTTRAIL <xx>, CHECKPOINTTABLE ggadmin.<checkpoint_table_name>
2023-01-28T19:35:31Z  INFO    OGG-08100  Integrated Replicat added.

7) Start Replicat

OGG (https://localhost:34030 gg_inst1 as <alias>@<db>) 34> start replicat <replicat_name>, AFTERCSN <scn_number>
2023-01-28T19:39:11Z  INFO    OGG-00975  Replicat group <replicat_name> starting.
2023-01-28T19:39:11Z  INFO    OGG-15445  Replicat group
<replicat_name> started.

8) Check status of Replicat

OGG (https://localhost:34030 gg_inst1 as <alias>@<db>) 42> status replicat <replicat_name>
REPLICAT <replicat_name>: RUNNING

OGG (https://localhost:34030 gg_inst1 as <alias>@<db>) 43> info replicat <replicat_name>

Replicat  
<replicat_name>      Last Started 2023-01-28 19:45   Status RUNNING
INTEGRATED
Checkpoint Lag       00:00:00 (updated 00:00:01 ago)
Process ID           16725
Log Read Checkpoint  File ec000000004
                     2023-01-28 17:22:22.709870  RBA 1858
Encryption Profile   LocalWallet

 


No comments: