Dear Readers,
In this article, we will see Installation and Configuration of GoldenGate 19C on Oracle RAC .
Source: 2-Node RAC Oracle 19c Database
Source Server has a NFS Drive: /goldengate
Target: Oracle 19c Database
Plan: Install GoldenGate on both the machine and a soft link is created to the NFS drive for dirdat, dirprm, dirchk and BR directories respectively
Source Machine: OS Pre-requisite:
Create an OS account named as ggusr, ggusr should be part of oinstall group as Primary and gggrp as secondary group on both the machine.
Create Directories in NFS Drive:
mkdir /goldengate/dirdat
mkdir /goldengate/dirprm
mkdir /goldengate/dirchk
mkdir /goldengate/BR
Source Machine: Follow the same Steps to Install and Configure OGG on both the machines:
Download OGG19c from Download.oracle.com from Oracle 19c
Create Directory: /u01/ogg19
Update the response File in the OGG binaries
<ogg_binaries>/response/oggcore.rsp
INSTALL_OPTION=ORA19c
SOFTWARE_LOCATION=/u01/ogg19 —-location where GoldenGate to be installed
START_MANAGER=false
MANAGER_PORT=
DATABASE_LOCATION=<Oracle Home Location>
INVENTORY_LOCATION=/u01/app/oraInventory
UNIX_GROUP_NAME=oinstall
Install the GoldenGate
./runInstaller -silent -nowait -responseFile <<<location of response file>>>
Set the ggusr Environment File
vi .bash_profile
GG_HOME = /u01/ogg19
ORACLE_SID = <Oracle_Instance_Name>
LD_LIBRARY_PATH = $ORACLE_HOME/lib:$GG_HOME
ORACLE_HOME=<<<ORACLE_HOME>>>
GG_HOME=/u01/ogg19
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$GG_HOME:/lib:/usr/lib;
Go to Golden Gate home directory and type the following command
cd /u01/ogg19
./ggsci
Create symbolic links for the directories that are not controlled by Oracle GoldenGate parameters on both the RAC nodes
export GG_HOME=/u01/ogg19
% ln –s /goldengate/dirprm $GG_HOME/dirprm
% ln –s /goldengate/dirchk $GG_HOME/dirchk
% ln –s /goldengate/BR $GG_HOME/BR
% ln –s /goldengate/dirdat $GG_HOME/dirdat
Source : Configure Database for Capture
Create a database User ggusr for extraction
SQL> create user ggusr identified by <password>;
SQL> create tablespace ggdata datafile ‘ <file path>’ size 1G;
SQL> alter user ggusr QUOTA UNLIMITED ON ggdata;
SQL> grant create session, alter session, alter system, resource, connect to ggusr;
SQL> grant select any dictionary, flashback any table, select any table to ggusr;
SQL> grant select any transaction, execute on DBMS_FLASHBACK to ggusr;
SQL> exec dbms_goldengate_auth.grant_admin_privilege(‘ggusr’);
Configure Database
– Enable Force Logging
SQL> ALTER DATABASE FORCE LOGGING;
– Enable Supplemental Logging
SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;
SQl> Alter system switch logfile;
– Enable goldengate Replication parameter
SQL> Alter system set enable_goldengate_replication=true;
Execute GoldenGate Script and input user ggusr (Not required if using integrated)
SQL> @$GG_HOME/marker_setup.sql
SQL> @ $GG_HOME/role_setup.sql
SQL> @ $GG_HOME/ddl_setup.sql
SQL> @$GG_HOME/ddl_enable.sql
SQL>@$GG_HOME/sequence.sql
Source: Follow below steps in any of machine to configure GoldenGate:
Create Subdirectories
cd $GG_HOME
./ggsci
ggsci> create subdirs
Edit the manager parameter file on the ggsci prompt
ggsci> edit params mgr
port <port_number>
DYNAMICPORTLIST <portlists_number>
USERID ggusr@<<<TNS_for_GG>>>, PASSWORD <password>
AUTORESTART ER *, RETRIES 5, WAITMINUTES 2, RESETMINUTES 120
AUTOSTART ER *
PURGEOLDEXTRACTS /u01/ogg19/dirdat/*, USECHECKPOINTS, MINKEEPDAYS
Type the below command for starting Golden Gate Manager process:
Ggsci> start manager
Encrypting Database User ggusr Password
ggsci> encrypt password <DB User Password> ,blowfish
This will return the password in encrypted format
This encrypted password can be used to login to Database through GoldenGate
ggsci> dblogin userid ggusr,password <encrypted password> , blowfish
Enable Trandata
Assuming scott is a user to be replicated
ggsci> add schematrandata scott;
Configure Capture
Ggsci> register extract cp1 database
Ggsci> add extract cp1, integrated tranlog, begin now
Ggsci> add exttrail /u01/ogg19/dirdat/xx, extract cp1
ggsci> edit params cp1
extract cp1
SETENV (ORACLE_HOME =”/<<<ORACLE_HOME>>>”)
SETENV (ORACLE_SID =”<<<ORACLE_SID>>>”)
Userid ggext@<<<ORACLE_SID>>>, PASSWORD <encrypted password> ,BLOWFISH
EXTTRAIL /u01/ogg19/dirdat/xx
DDL INCLUDE MAPPED
— Sequence and Table statements that identify data to capture.
SEQUENCE scott.*;
TABLE scott.*;
Configure Pump process
Ggsci> add extract pp1, exttrail /u01/ogg19/dirdat/xx
Ggsci> add rmttrail /u01/ogg19/dirdat/xx, extract pp1
ggsci> edit params pp1
extract pp1
PASSTHRU
RMTHOST <<<target_server_ip>>>, MGRPORT 7809
RMTTRAIL /u01/ogg19/dirdat/xx
SEQUENCE scott.*;
TABLE scott.*;
Configure the Target Machine (Single Instance Database):
Install the GoldenGate on target machine same steps as Source Machine under B) heading
Configure Database for Target Server same as in Source Server
add below additional privilege to ggusr in database
delete any table, alter any table, insert any table, update any table
Encrypt password as it is done for Source Server
Create Checkpoint TABLE for replication
ggsci> dblogin userid ggusr,password <> , blowfish
ggsci> delete CHECKPOINTTABLE GGREP.GGCHKPT
ggsci> add CHECKPOINTTABLE GGREP.GGCHKPT
Register Replicats to database
register replicat REP1 database
Add Replicats
Ggsci> add replicat REP1, INTEGRATED, exttrail /goldengate/ogg19/dirdat/xx CHECKPOINTTABLE GGREP.GGCHKPT
Parameter file for Replicat
ggsci> edit params rep1
REPLICAT REP1
— Database environment variables.
SETENV (ORACLE_HOME=”<Target Server Oracle Home>”)
SETENV (ORACLE_SID = “<Target Database ID>”)
— Replicat database user login, with encrypted password.
USERID ggrep, PASSWORD <encrypted password> BLOWFISH, ENCRYPTKEY DEFAULT
— Discard file.
DISCARDFILE /u05/goldengate/ogg/dirrpt/carep5.dsc, PURGE
DISCARDROLLOVER ON SUNDAY
— MAP statement to MAP source objects to TARGET objects.
MAP IMPAUX.ESB_MAPPING_PKG TARGET CAADM.ESB_MAPPING_PKG;
Perform the Initial Load (using export Import):
Source:
Take Consistent Export at source server
SQL> Select current_scn from v$database;
expdp directory=dir1 dumpfile=scott.dmp logfile=scott.log schemas=scott flashback_Scn=<SCN>
copy the Dump file scott.dmp to the target Server
Import the Schema scott to target database
impdp directory=dir1 dumpfile=scott.dmp logfile=scott.log content=all table_exists_action=truncate flashback_SCN=<SCN>
Start the replication:
Source:
Ggsci> start cp1
ggsci> start pp1
Target:
ggsci> start rep1, aftercsn <SCN Captured during export>
Thank you for giving your valuable time to read the above information.
Follow us on
Website : www.ktexperts.com
Facebook Page : KTexperts
Linkedin Page : KT EXPERTS
Follow Me On
Linkedin :Ankush Chawla
goutham
Hi ktexperts Team.
small help on how to install 19c golden gate silent installation.
thanks
Goutham