Oracle GoldenGate Pocket Reference-NSM
Oracle GoldenGate Pocket Reference-NSM
Oracle GoldenGate Pocket Reference-NSM
com
Collector This diagram explains the logical architecture of an Oracle GoldenGate online replication.
It receives data from Pump Extract and writes data to remote trail files
GoldenGate Topologies
Replicat Oracle GoldenGate modular architecture provides the ability to extract DML & DDL
It reads data from remote trail files and write to the database one transaction at a time changes across variety of Topologies.
Checkpoints
It provides the transaction recovery in case GoldenGate processes stopped abnormally.
Wallet
It is a secure common storage for User IDs and Passwords. It is highly recommended to
use wallet for secure credentials
INITIAL LOAD Open the response and edit the following parameters
- File to Replicat $ vi oggcore.rsp
Extract process write data to trail files and Replicat loads data using SQL on target DB INSTALL_OPTION=ORA11g
- File to Database Utility SOFTWARE_LOCATION=/u01/app/oracle/product/ogg/12.2.0.22/gghome
Extract process write data to text files and Replicat loads data using DB utility on target START_MANAGER=true
- Direct Load MANAGER_PORT=7809
Extract process gives data directly to Replicat & Replicat loads data using SQL on target DATABASE_LOCATION=/u01/app/oracle/product/12.2.0/dbhome
- Direct Bulk Load INVENTORY_LOCATION=/u01/app/oraInventory
Extract process gives data directly to Replicat & Replicat loads data using DB utility UNIX_GROUP_NAME=oinstall
Oracle GoldenGate One-Way Replication Setup – Classic Oracle GoldenGate One-Way Replication Setup – Integrated (12c)
High-levels to configure Oracle GoldenGate one-way replication 11.2.0.4 and above
- Install OGG software on source and Target SQL> alter system set ENABLE_GOLDENGATE_REPLICATION=true;
$ impdp userid = ggs/xxxx directory = IMP_DIR dumpfile = expdp_src.dmp logfile = GGSCI> dblogin useridalias ggs
impdp_tgt.log status=60 remap_schemas = SCOTT:SCOTT GGSCI> add checkpointtable ggs.chkpoint_table
GGSCI> edit params ./GLOBALS
- Create checkpoint table CHECKPOINTTABLE GGS.CHKPOINT_TABLE
$ ./ggsci
GGSCI> exit
GGSCI> dblogin userid ggs, password xxxx
GGSCI> add checkpointtable ggs.chkpoint_table GGSCI> Edit Param rint
GGSCI> edit params ./GLOBALS Replicat rint
DBOPTIONS INTEGRATEDPARAMS(parallelism 6)
CHECKPOINTTABLE GGS.CHKPOINT_TABLE assumetargetdefs
discardfile ./dirrpt/rint.dsc, Purge
GGSCI> exit dblogin useridalias ggs
Map scott.*, target scott.*;
- Configure Replicat on Target
GGSCI> edit params rep GGSCI> dblogin useridalias ggs
REPLICAT REP GGSCI> add Replicat rint Integrated exttrail ./dirdat/ie
USERID ggs, PASSWORD xxxxxx GGSCI> Start Replicat rint
ASSUMTARGETDEFS GGSCI> info all
MAP SCOTT.*, TARGET SCOTT.*;
SQL> connect / as sysdba
GGSCI> dblogin userid ggs, password xxxxx SQL> column replicat_name format a30
GGSCI> add replicat rep, exttrail /ggs/home/dirdat/rt SQL> column server_name format a30
GGSCI> start replicat SQL> select replicat_name,server_name from DBA_GOLDENGATE_INBOUND;
GGSCI> info rep
- Create initial data load extract - Create initial data load extract
$ cd $GG_HOME $ cd $GG_HOME
$ ./ggsci $ ./ggsci
GGSCI> ADD EXTRACT ELOAD, SOURCEISTABLE
GGSCI> INFO EXTRACT ELOAD, TASKS GGSCI> Edit Param eload
SOURCEISTABLE
GGSCI> EDIT PARAMS ELOAD USERID ggs, PASSWORD ggs
EXTRACT ELOAD RMTHOST 10.10.10.2, MGRPORT 7809
USERID ggs, PASSWORD ggs -- Below rmtfile command will create 50 files of size 2GB each on target server
RMTHOST 10.10.10.2, MGRPORT 7809 RMTFILE ./dirdat/el, maxfiles 50 MEGABYTES 2048
RMTTASK REPLICAT, GROUP RLOAD TABLE SCOTT.*;
TABLE SCOTT.*; GGSCI> exit
GGSCI> ADD EXTRACT ELOAD, SOURCEISTABLE $ ./extract paramfile dirprm/eload.prm reportfile dirrpt/eload.rpt
- Create initial data Replicat process on target $ ps -ef|grep eload
$ cd $GG_HOME $ cat dirrpt/eload.rpt | more
$ ./ggsci - Create initial data Replicat process on target
GGSCI> ADD REPLICAT RLOAD, SPECIALRUN $ cd $GG_HOME
GGSCI> INFO RLOAD, TASKS $ ./ggsci
GGSCI> add rep rload, exttrail ./dirdat/el, nodbcheckpoint
GGSCI> EDIT PARAMS RLOAD
REPLICAT RLOAD GGSCI> EDIT PARAMS rload
USERID ggs, Password ggs Replicat RLOAD
DISCARDFILE ./dirdat/rustarc.DSC, PURGE USERID ggs, Password ggs
BATCHSQL DISCARDFILE ./dirdat/rustarc.DSC, PURGE
MAP SCOTT.*, TARGET SCOTT.*; DBOPTIONS SUPPRESSTRIGGERS
DBOPTIONS USEREPLICATIONUSER
GGSCI> ADD REPLICAT RLOAD, SPECIALRUN BATCHSQL
MAP SCOTT.*, TARGET SCOTT.*;
- Start Initial Load on source only
GGSCI> start eload GGSCI> start replicat rload
GGSCI> info eload
GGSCI> info rload check on target $ ps -ef|grep rload
$ cat dirrpt/rload.rpt | more