8/16/2019 Oracle GoldenGate Basic Architecture http://slidepdf.com/reader/full/oracle-goldengate-basic-architecture 1/24 1. Oracle GoldenGate Basic Architecture. Source Database - GoldenGate extracts the information from the source database. The source database may be from any of the following vendors. - Oracle Database - TimesTen - y!"# - $B DB% - icrosoft !"# !erver - Teradata - !ybase - &nscribe - !"#'( Capture(Local Extract) - )a*ture is the *rimary *rocess in which all the commited D# and DD# changes are extracted from the source database. Source Trail - The data extracted from the source database is written to the source trail+ which is basically a staging ,le and will be used by other *rocesses &x data*um*/. Datapump - The data*um* which is a goldengate *rocessnot to be confused with oracle data*um*/+ reads the information from the source trail+ transfers it to the target host via T)0'$0 and writes it down to the remote trail. Network - GoldenGate sends the data from the source trail via T)0'$0 to the target host and writes it in the remote trail. Collector - The collector *rocess is automatically started by the manager. This *rocess runs in the bacground+ $t ca*tures and writes all the data received to the remote trail. Remote Trail - 2emote trail is similar to source trail. The only di3erence between the two is that the remote trail is at the target host and the source trail is at the source Database host. Delivery(Replicat) - The delivery *rocess a**lies all the changes to the target database by reading the remote trail. The changes are done to the target database in the same order as they were done in the source database. Target Database - Target database is the database at which all the changes are a**lied. $t can be same or di3erent from the source database.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Capture(Local Extract) - )a*ture is the *rimary *rocess in which all the commited D#and
DD# changes are extracted from the source database.
Source Trail - The data extracted from the source database is written to the source trail+which is basically a staging ,le and will be used by other *rocesses &x data*um*/.
Datapump - The data*um* which is a goldengate *rocessnot to be confused with oracledata*um*/+ reads the information from the source trail+ transfers it to the target host via
T)0'$0 and writes it down to the remote trail.
Network - GoldenGate sends the data from the source trail via T)0'$0 to the target hostand writes it in the remote trail.
Collector - The collector *rocess is automatically started by the manager. This *rocessruns in the bacground+ $t ca*tures and writes all the data received to the remote trail.
Remote Trail - 2emote trail is similar to source trail. The only di3erence between thetwo is that the remote trail is at the target host and the source trail is at the sourceDatabasehost.
Delivery(Replicat) - The delivery *rocess a**lies all the changes to the target database byreading the remote trail. The changes are done to the target database in the same order asthey
were done in the source database.
Target Database - Target database is the database at which all the changes are a**lied.$t can be same or di3erent from the source database.
Before going any further mae sure your database is inarchivelog mode.
0re*are your database for re*lication.
$n order to extract committed transactions from the source databasethe database must be con,gured with su**lemental logging on *rimaryey columns.
!"#I alter database add su**lemental log data *rimary ey/ columns8
Database altered.
Do a logswitch to start su**lemental logging.
!"#I alter system switch log,le8
!ystem altered.
!"#I select su**lemental9log9data9min+ su**lemental9log9data9*+su**lemental9log9data9ui from v4database8
!J00#&& !J0 !J0-------- --- ---$0#$)$T :&! KO
!J00#&&KTA#9#OG9DATA9$K &nsures that logminer will have suHcient information.!J00#&&KTA#9#OG9DATA90L $ndicates whether all columns of the *rimary ey are *lacedintothe redo log whenever an u*date is *erformed.!J00#&&KTA#9#OG9DATA9J$ $ndicated whether all columns belonging to the uniMue eyare *laced
!ending !TA2T reMuest to AKAG&2 ...&(T2A)T D0J01 starting
To stop 'atapump4
GG!)$I sto* extract d*um*1
GG!)$ canada/ 1<I info extract d*um*1
)ode
")$R4C$ !P8*P1 Last Started 01(05(16 0:63 Status R8999;Checkpoint Lag 00:00:00 <updated 00:00:07 ago=Log Read Checkpoint ?ile dirdat/t1000000 ?irst Record R>4 75
discardrollover at F55 on sundayma* !)OTT.P+ target !)OTT.P8
--handlecollisions hel*s in detection and resolution of D# errors+ while a**lying--changes to the target.
--assumetargetdefs *arameter tells the GoldenGate software that source and--target tables are identical.
--discard,le *arameter instructs the GoldenGate software to write--all the errors encountered to the ,le s*eci,ed.
--discardrollover *arameter instructs the goldengate software to create--a new discard,le every sunday at F55.--The old discard ,le can be safely deleted in order to avoid--s*ace constraints.
R"PLC4$ R"PL1 Last Started 01(05(16 1:3 Status R8999;Checkpoint Lag 00:00:00 <updated 00:00:0 ago=Log Read Checkpoint ?ile dirdat/t000000 ?irst Record R>4 0
>/ DD# re*lication is su**orted only between two systems. Bi-directional DD# re*licationis also su**orted. DD# re*lication between one to many systems is not su**orted.
/ DDl statements that are less than %B in length will be re*licated automatically+any statement longer than that will have to be manually *rocessed by Golden Gate scri*t.
F/ 0assthru *aramater is to be con,gured while con,guring data*um* for tables that reMuireDD# re*lication.
ain di3erences when im*lementing DD# re*lication as com*ared to D# re*lication isthat you have to create G#OBA#! ,le in both source and target schema.
2un certain scri*ts on source to facilitate DD# re*lication.
Add one additional *arameter to the local extract,le i.e ddl include ma**ed obRname ;!)OTT.P/.
!"#P0lus 2elease 11.%.5.1.5 0roduction on Tue ar %Q %1F5%Q %51%
)o*yright c/ 1<%+ %55+ Oracle. All rights reserved.
&nter user-name ' as sysdba
)onnected toOracle Database 11g &nter*rise &dition 2elease 11.%.5.1.5 - 0roductionSith the 0artitioning+ O#A0+ Data ining and 2eal A**lication Testing o*tions
S;L< =marker>setup4s?l
)ode
*arker setup script
Bou ,ill be prompted for the name of a schema for the ;olden;ate database obects.9'$": $he schema must be created prior to running this script.
9'$": Stop all !!L replication before starting this installation.
Enter GoldenGate schema name:ggs_admin
*arker setup table script complete- running &erification script...Please enter the name of a schema for the ;olden;ate database obects:Setting schema name to ;;SD4!*9
%erifying that current user has pri&ileges to install !!L Replication...
Bou ,ill be prompted for the name of a schema for the ;olden;ate database obects.9'$": ?or an 'racle 10g source- the system recycle bin must be disabled. ?or 'racle11g and later- it can be
enabled.9'$": $he schema must be created prior to running this script.9'$": Stop all !!L replication before starting this installation.
Enter GoldenGate schema name:ggs_admin
Bou ,ill be prompted for the mode of installation.$o install or reinstall !!L replication- enter 9$4LS"$8P$o upgrade !!L replication- enter 9'R*4L"nter mode of installation:INITIALSETUP
Forking- please ,ait ...Spooling to file ddlDsetupDspool.t#t
Checking for sessions that are holding locks on 'racle ;olden ;ate metadata tables ...
Check complete.
8sing ;;SD4!*9 as a ;olden;ate schema name- 9$4LS"$8P as a mode of installation.
Forking- please ,ait ...
!!L replication setup script complete- running &erification script...Please enter the name of a schema for the ;olden;ate database obects:Setting schema name to ;;SD4!*9
$o use a different role name- uit this script and then edit the params.slscript to change the ggDrole parameterto the preferred name. <!o not run the script.=
Bou ,ill be prompted for the name of a schema for the ;olden;ate database obects.9'$": $he schema must be created prior to running this script.9'$": Stop all !!L replication before starting this installation.
1. Oracle Goldengate 11g $nitial #oad Jsing Direct #oad ethod.
This article focuses on initial synchroniEation of source andtarget databases by using Golden Gate initial direct load method for the*ur*ose of Eero downtime D# re*lication.
&rere?uisites%
1/ Target Tables should be em*ty. Otherwise you can get du*licate row errors.%/ Disable Coreign Ley and )hec )onstraints. They can be enabled later onwhen the initial load is com*lete.>/ O*tional/ 2emove indexes from target tables as they may slow down theinitial loading *rocess./ To use handlecollisions function+ each target table must have a*rimary or uniMue ey. $f thatNs not *ossible use the L&:)O#!o*tion of the TAB#& and A0 *arameters. &ven if that is not *ossiblethen Muiesce your database for the duration of intial load.
Sc8ema to be replicate' 1SCTT1
0) 6stall Gol'eGate o bot8 t8e mac8ies4
) Disable $oreig key a' c8eck costraits a' triggers o target tables4
!"#I select )OK!T2A$KT9KA&+)OK!T2A$KT9T:0&+TAB#&9KA&+status fromdba9constraints where owner7N!)OTTN8
C'9S$R49$D94*" C $4>L"D94*" S$4$8S(((((((((((((((((((((((((((((( ( (((((((((((((((((((((((((((((( ((((((((?ED!"P$9' R "*P "94>L"!PED!"P$ P !"P$ "94>L"!PED"*P P "*P "94>L"!
!"#I alter table em* disable constraint f9de*tno8
Table altered.
) Co9gure a' start extract process o source4
) co9gure a' start Data &ump process o source4
F) Co9gure 6itial loa' extract a' replicat processes4
SpecialRu - 2uns as a onetime *rocess with distinct beginning and end+which is di3erent from continuous *rocessing as it does not have as*eci,c end *oint.
Source
!tart initial load extract *rocess on source. The re*licat *rocesson target will start automatically.
Sending S$4R$ reuest to *494;"R ...")$R4C$ 9L'4!1 starting
GG!)$ canada.exam*le.com/ >5I info extract iniload1
)ode
")$R4C$ 9L'4!1 Last Started 01(11(15 1:73 Status R8999;Checkpoint Lag 9ot 4&ailableLog Read Checkpoint $able SC'$$.!"P$ 01(11(15 1:73:5 Record 1$ask S'8RC"S$4>L"
01(11(15 1:73: F4R99; ';;(0032 9o uniue key is defined for table >'98S. 4ll&iable columns ,ill be used to represent the key- but may not guarantee uniueness. E"BC'LS may be used todefine the key.
8sing the follo,ing key columns for source table SC'$$.>'98S: "94*"- J'>- S4L- C'**.$4>L"Fildcard resol&ed <entry SC'$$.@=: table SC'$$.!"P$K
8sing the follo,ing key columns for source table SC'$$.!"P$: !"P$9'.$4>L"Fildcard resol&ed <entry SC'$$.@=: table SC'$$."*PK
8sing the follo,ing key columns for source table SC'$$."*P: "*P9'.$4>L"Fildcard resol&ed <entry SC'$$.@=: table SC'$$.S4L;R4!"K
01(11(15 1:73: F4R99; ';;(0032 9o uniue key is defined for table S4L;R4!".4ll &iable columns ,ill be used to represent the key- but may not guarantee uniueness. E"BC'LS may be usedto define the key.
8sing the follo,ing key columns for source table SC'$$.S4L;R4!": ;R4!"- L'S4L- AS4L.
C4CA"*;R &irtual memory &alues <may ha&e been adusted=C4CA">8??"RSG": 27EC4CA"SG": ;C4CA">8??"RSG" <soft ma#=: 7*C4CA"P4;"'8$SG" <normal=: 7*PR'C"SS %* 4%4L ?R'* 'S <min=: .3;C4CA"SG"*4) <strict force to disk=: .27;
!atabase Language and Character Set:9LSDL49; en&ironment &ariable specified has in&alid format- default &alue ,ill beused.9LSDL49; en&ironment &ariable not set- using default &alue 4*"RC49D4*"RC4.8S4SC.9LSDL49;84;" M4*"RC49M