Introduction
Oracle GoldenGate is product used to replicate the data in
database from system to another. It can replicate the data across various
heterogeneous environments. Let’s say we have source database is Oracle running
on Linux, data from source can be replicated on other database Microsoft SQL
server running on windows using GoldenGate.
Please see some of the databases supported on GoldenGate
- Oracle
- MySQL
- IBM DB2
- Microsoft SQL Server
- Teradata
- Sybase etc.
GoldenGate Topologies
- Uni-Directional: We have one source and one target, data gets replicated from source to target not the other way around
- Bi-Directional: We have one source and one target, all the transaction happening on source will be replicated on to the target system and system behaves in the same way i.e. replication happens from target to source Here both the database will be active-active mode
- Consolidation: In this topology, there are multiple source databases and all the transactions happening on various source would be replicated on the singe database. Typically this topology is used to implement reporting system
- Broadcasting: There is single source and multiple target databases
- Peer-to-Peer: This topology is useful in load balancing and high availability
- Cascading: Data from system A would be replicated on system B, from system B data gets replicated on to the various target systems. This topology is used to reduce the contention on single system
GoldenGate Architecture
- Manager: This process runs on both source and target system. Manager is responsible for restarting extracts and replicat processes. It’s also responsible for purging old trail files on both source and target side
- Extract Process: It runs on the source side which is also known as capture process. Extract process captures committed transactions on the source side and writes them on to the trail files which is in GodenGate format. It reads the committed transactions from database logs
- Pump Process: It’s the optional component but highly recommended to use, because it protects the replication in case of potential network break down. Pump process reads the data from local trail files and send it to the target through network
- Trail Files: It holds the data collected from extract process in source and also similar trail files resides on the target database which is used on target side to consume the data. Data is organized in trail files in the order of the commits to maintain data integrity
- Collector Process: It receives the committed data sent from source extract or pump process through the network on to the target side. Collector process writes the collected data on to the remote trail files on target side and this file would be consumed by the replicat process.
- Replicat process: This process writes the transactions stored in the remote trail files and is also known as apply process
What is checkpoint table in Oracle GoldenGate
Oracle GoldenGate extract and replicat processes perform checkpoint operations. In the event of failure (extract or replicat), the checkpoint file or database table ensures extract and replicat processes re-start from the point failure and avoid re-capture and re-apply of transactions. Below mentioned command can be used to create checkpoint table
GGSCI (stby.localdomain as ggowner@GGTGT) 2> add checkpointtable ggowner.checkpoint
Successfully created checkpoint table ggowner.checkpoint.
Successfully created checkpoint table ggowner.checkpoint.