Oracle GoldenGate Introduction
GoldenGate software is based on the log-structured data replication software. GoldenGate enables a large number of transactions in real-time capture, transformation and delivery, data source and target database synchronization, data holding sub-second delay.
GoldenGate can support a variety of topologies, including one to one, one to many, many to one, and stacked bi-directional replication, etc.
Data replication topology are the following
A static extraction of data records from one database and the loading of those records
to another database.
Continuous extraction and replication of transactional DML operations and DDL
changes (for supported databases) to keep source and target data consistent.
Extraction from a database and replication to a file outside the database.
Oracle Goldengate consists of the following components
Trails or extract files
Extract process used to capture the data source, there are three types
When configured for INITIAL LOAD mode, the data source for the table.
Recovery log database (also referred to some database transaction log).
Third-party capture model by calling Extact API to send data to the database changes Extract process.
Extract Data pump is optional auxiliary component, if not configured Data pump, Extract the captured data directly to the Collector process on the target machine.
Use Data pump can provide the following advantages
Prevent network or target side Collector fails to protect data loss.
data pump can be used to worry too much, data conversion, or configured Pass-through mode, ie without any action, but the delivery of data.
Start multiple Data pump-many data distribution (or a table of data, according to the type of data sent to a different destination system)
Replicat running on the destination server, the file data is read from the Trail Reconstruction DML, DDL statements, and apply it to the destination database. You can configure multiple Replicat, concurrent work to improve the throughput of the system.
Trail To support continuous capture, copy, alter database, Oracle database to capture changes recorded on a series of temporary disk file. The disk file is called Trail file.
A Trail Extract files can only be a write. Extract each process must be linked to a Trail file.
After Checkpoints When Goldengate process becomes corrupt, you can recover Goldengate instance.
Manager is to manage the process Goldengate.
Before Extract and Replicat start, you must start the Manager process on each node.
Manager has the following functions
Start Oracle GoldenGate processes
Start dynamic processes
Maintain port numbers for processes
Perform trail management
Create event, error, and threshold reports
Collector, the remote system to receive data transmission, and writes Trail file.
In order to distinguish between multiple systems or Replicat Extract process, we need to define treatment group
A group including the following
A process, Extract or Replicat
Its checkpoint file
Associated with this process in any other documents.
Oracle GoldenGate Installation and Configuration Guide
Oracle GoldenGate must first download the installation package. Download the following address
The Oracle GoldenGate installation package uploaded to the server
[Oracle @ localhost app] $ mkdir / u01 / app / ogg
[Oracle @ localhost app] $ unzip -d / u01 / app / ogg ogg112101_fbo_ggs_Linux_x64_ora11g_64bit.zip
inflating: / u01 / app / ogg / Oracle GoldenGate 188.8.131.52.1 README.txt
inflating: / u01 / app / ogg / Oracle GoldenGate 184.108.40.206.1 README.doc
[Oracle @ localhost app] $ cd ogg /
[Oracle @ localhost ogg] $ tar -xvf fbo_ggs_Linux_x64_ora11g_64bit.tar
Modify environment variables, add PATH, LD_LIBARY_PATH
[Oracle @ localhost ~] $ vi .bash_profile
export PATH = / u01 / app / ogg /: $ ORACLE_HOME / bin: $ PATH
export LD_LIBRARY_PATH = / u01 / app / ogg: $ ORACLE_HOME / lib: / lib: / usr / lib
Enter ogg installation directory, run the command ggsci
[Oracle @ localhost ogg] $ ./ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 220.127.116.11.1 OGGCORE_18.104.22.168.1_PLATFORMS_120423.0230_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Apr 23 2012 08:32:14
Copyright (C) 1995, 2012, Oracle and / or its affiliates. All rights reserved.
GGSCI (localhost.localdomain) 1>
Create a working directory OGG
GGSCI (localhost.localdomain) 1> create subdirs
Creating subdirectories under current directory / u01 / app / ogg
Parameter files / u01 / app / ogg / dirprm: already exists
Report files / u01 / app / ogg / dirrpt: created
Checkpoint files / u01 / app / ogg / dirchk: created
Process status files / u01 / app / ogg / dirpcs: created
SQL script files / u01 / app / ogg / dirsql: created
Database definitions files / u01 / app / ogg / dirdef: created
Extract data files / u01 / app / ogg / dirdat: created
Temporary files / u01 / app / ogg / dirtmp: created
Stdout files / u01 / app / ogg / dirout: created
Process Manager configuration parameters
GGSCI (localhost.localdomain) 6> EDIT PARAMS MGR
Add the following communication port definition Manger process
- This is the minimal configuration of Manager
- Followed by comments
Start Process Manager
GGSCI (localhost.localdomain) 14> start mgr
View Manager process
GGSCI (localhost.localdomain) 17> info mgr
Manager is running (IP port localhost.localdomain.7809).
Stop Process Manager
GGSCI (localhost.localdomain) 18> stop mgr
Manager process is required by other GGS processes.
Are you sure you want to stop it (y / n)? Y
Sending STOP request to MANAGER ...
If you ignore your profile
GGSCI (localhost.localdomain) 20> stop mgr!
Sending STOP request to MANAGER ...