This post covers Lessons Learned & Key Takeaways related to Oracle GoldenGate Processes, & DML Replication Setup from Day2 of Oracle Golden Gate Training covered from Module III.
Use these tips to learn Oracle GoldenGate & ask any questions under comment under comment and for Day1 (Module I & II) covering Architecture, Concepts, Install, and Configure GoldenGate Click HERE.
- If you are not sure if you are right fit for GoldenGate or What & Why to Learn Oracle GoldenGate or How to Learn Oracle GoldenGate like experts then check my Video Post on Blog here
Here are some of the key takeaways from Day2 training covering Module III
Processes in Oracle GoldenGate
- Processes of Oracle GoldenGate includes Capture, Pump, and Delivery
- Capture Process (aka Extract) captures committed transaction from Transaction Logs in Source Database and writes them to Trail Files
- On Source Database these Trails are called Local Trails & on Target Database, Trails Files called Remote Trail
- Pump Process reads Local Trails, ships committed transactions over TCP/IP and writes to Remote Trail
- Delivery Process (aka Replicat) at Target Database reads Remote Trail File and Apply Committed Transaction to Target Database
Configuration for DML Replication
- Define Capture Process to Write to Local Trail
- Define Pump Process, Remote Trail and end data to Remote Trail from Pump Process over TCP/IP
- Define Delivery Process to Apply changes to Target Database
- Start GGSCI (GoldenGate Software Command Interface) and connect to Source Database using GGSCI>dblogin userid *** command
- Add Transaction Data Capture on Tables that needs to be replicated using GGSCI> add trandata <DB>.<SCHEMA>.<TABLENAME>
- Supplemental Logging is of two types i) Database Level ii) Object Level in Activity Guide II, we enabled Supplemental Logging at Database Level and in above command we are setting it at Object Level
- To Configure Capture Process in GoldenGate, make sure Manager Process is configured and Running then run GGSCI> add extract <Extract/Capture_ProcessName> , integrated tranlog begin now
- Length of any process in GoldenGate can’t exceed more than 8 Characters
- Once Capture/Extract Process is added in GoldenGate Register this Capture/Extract Process with Database using GGSCI> register extract <Extract/Capture_ProcessName> database container (<PDB_Name>)
- You can use one GoldenGate Instance for multiple Databases however, one Capture Process can be used for only one database so if you have two databases create two capture/extract process and register with respective Database
- It is not possible to register same extract process with two Databases
- When you register extract/capture process with database, in alert log of database you’ll notice Log Miner Process Starts
Define Local Trail
- Local Trails (also called exttrail) are inside dirdat folder of GoldenGate ORACLE_HOME
- To define local trail run GGSCI> add exttrail </FULL_PATH/LT> extract <Extract/Capture_ProcessName>
- Trail will always be generated in format </FULL_PATH/XX><NNNNNNNN> (9 Numbers started with 0)
- Every Trail file has sequence associated to it in format <two_character><NNNNNNNNN>
- By Default size of trail file is 500MB by default, and max size could be 10GB
Define Data Pump & Remote Trail
- DataPump is a secondary Extract process that extracts data from Trail File whereas primary is Capture
- To define Datapump run GGSCI> add extract <Extract/Capture_ProcessName> exttrailsource </FULL_PATH/LT> where </FULL_PATH/LT> is location of local trail defined in previous section
- To add remote trail GGSCI> add rmttrail </FULL_PATH_ON_TARGET/RT> extract <Extract/Capture_ProcessName_ForDataPump>
Parameter Files & How to Edit
- Each Process (Capture, Pump, Delivery) in GoldenGate has Parameter File associated to it
- To Create Parameter file use command GGSCI> edit param <Process_Name>
- Parameter File is created under directory GoldenGate $ORACLE_HOME/dirprm
- In Parameter File content is in format
- First line is always <Provess_Type> <Process_Name> where process type is like Extract or Replicat
- Second line is userid <DB_User>, password <DB_User_Password>
- If process type is Extract then add location of Trail File like EXTTRAIL <Trail_File_Location>
- Tables you want to extract like TABLE <Name_Of_Table_For_This_Extrac
t_Process>; - For Dama Pump Process (Process Type as Extract) add in parameter file remotehost <IP or Hostname>,mgrport <ManagerPort_On_Remote_Host>
- In parameter file, only parameter with Table Name end with ; (Semi Colon) Rest all parameters and commands on GGSCI ends without ;
Starting Extract Process & Report File
- Start Processes as GGSCI> start <process_name>
- Status of Process can be STARTING, RUNNING, STOPPED, ABENDED
- Every Process has a report file associated to it
- Report Files are generated inside GoldenGate $ORACLE_HOME/dirrpt
- You can access report file from directory dirrpt or from GGSCI
- To view report from GGSCI>view report <process_name>
Configure & Start Replicat Process on Target
- Add replicat process using GGSCI> add replicat <Process_Name>, integrated exttrail <Localtion_Of_RemoteTrail>
- Provide Mapping between Source & Target in Parameter File as
MAP <DB_NAME>.<SCHEMA_NAME>.<TABLE_NAME>, TARGET <DB_NAME>.<SCHEMA_NAME>.<TABLE_NAME> (Left Side is Source and Right Side is Target) - Start Replicat Processes as GGSCI> start <process_name>
Test Replication from Source to Target & Statistics
- Test Synchronization by updating Table in Source Database
- You can check statistics of each process using GGSCI>stats <process_name> to see what’s being processed
- Statistics are shown for data processed by that particular process since the last start of that process
- Only committed data is synchronized from Source to Target
We also covered a lot of useful Q/A from Day 2 GoldenGate Training, stay Tuned for my next post for the Day 3 of Oracle GoldenGate Training Workshop and if you want FREE 1 Hours Session on Oracle GoldenGate then Join Waitlist Here (We’ll Notify When We Re-Open FREE Webinar).
If you wish to learn GoldenGate systematically then look at Activity Guides (tasks) you must perform from our Step by Step Guide to Learn Oracle GoldenGate
If you are looking for commonly asked interview questions for Oracle GoldenGate then just click below and get that in your inbox or join our Private Facebook Group dedicated to Oracle GoldenGate Members Only.
Next Task For You
Want to move ahead in your career and want to get a higher Earning Job?
Get 7+ Courses for DBAs & Apps DBA in a bundle program and learn from the Industry’s best Experts.
Gurunadha Rao Bottu says
Thank you very much for valuable and useful information sharing sir
Atul Kumar says
Gurunadha Rao Bottu, Good to hear that you found it useful. Let us know what more you want to see about GoldenGate that will help your Career on in Job.
Mohan D Babu says
Do you have examples of a REPLICAT param file for the following two types of PARALLEL replicat under Goldengate version 12.3
a) For PARALLEL replicat and
b) For INTEGRATED Parallel replicat.
See the following that shows replicat “lnr1” is INTEGRATED PARALLEL replicat and the other replicat “l_n_r” is PARALLEL replicat. Replicat “LNR1”, as soon as i start i am getting contention issues. If i get examples then may be i might know where the problem is.
GGSCI (kycndsgtd51) 9> info lnr1
REPLICAT LNR1 Initialized 2018-09-17 05:18 Status STOPPED
INTEGRATED
Parallel
Checkpoint Lag 00:00:00 (updated 03:29:19 ago)
Log Read Checkpoint File /ggdata/dirdat/KYC1OGG/OUT/be000000000
First Record RBA 0
GGSCI (kycndsgtd51) 10> info l_n_r
REPLICAT L_N_R Last Started 2018-09-05 12:52 Status STOPPED
Parallel
Checkpoint Lag 00:00:00 (updated 80:43:35 ago)
Log Read Checkpoint File /ggdata/dirdat/KYC1OGG/OUT/be000000003
2018-09-14 00:04:56.829746 RBA 1485
Seema Yadav says
Hi Mohan,
Below is the example of parallel replicat. Do note, same can be used for integrated and non integrated parallel replicat:
replicat REP24AUG
useridalias c##ggadmin
INSERTMISSINGUPDATES
MAP_PARALLELISM 2
MIN_APPLY_PARALLELISM 2
MAX_APPLY_PARALLELISM 8
SPLIT_TRANS_RECS 4
MAP PDB1.ggtraining1.dept1, TARGET pdb2.ggtraining2.dept2;
For assistance on existing issue, do share the report file and the issue which you are facing.