Data replication using Oracle GoldenGate
Oracle
GoldenGate
The following steps show how to migrate data using Oracle GoldenGate:
-
The Oracle GoldenGate Extract process extracts all the existing data for the first load. Extract, Pump and Replicat process refers to the GoldenGate Integrated capture mode.
-
The Oracle GoldenGate Pump process transports the extracted data to the Replicat process running in Amazon EC2.
-
The Replicat process applies the data to the destination database.
-
After the first load, the process runs continually to capture changed data and applies it to the destination database.
GoldenGate Replicat is a key part of the entire system. You can run it from a server in the source environment, but AWS recommends that you run the Replicat process in an Amazon EC2 instance within AWS for better performance. This Amazon EC2 instance is referred to as a GoldenGate Hub. You can have multiple GoldenGate Hubs, especially if you are migrating data from one source to multiple destinations.
Reference architecture for Amazon EC2:
Reference architecture for RDS:
Setting up Oracle GoldenGate Hub on Amazon EC2
To create an Oracle GoldenGate Hub on Amazon EC2, create an Amazon EC2 instance with a full client installation of Oracle DBMS 12c
version 12.2.0.3 and Oracle GoldenGate 12.3.1.4. Additionally,
apply Oracle patch 13328193. For more information about installing
GoldenGate, see the
Oracle
GoldenGate documentation
This GoldenGate Hub stores and processes all the data from your source database, so make sure that there is enough storage available in this instance to store the trail files. It is a good practice to choose the largest instance type that your GoldenGate license allows. Use appropriate Amazon EBS storage volume types, depending on the database change rate and replication performance.
The following process sets up a GoldenGate Hub on an Amazon EC2 instance.
-
Add the following entry to the
tnsname.ora
file to create an alias. For more information about thetnsname.ora
file, see the Oracle GoldenGate documentation. $ cat /example/config/tnsnames.ora TEST= (DESCRIPTION= (ENABLE=BROKEN) (ADDRESS_LIST= (ADDRESS=(PROTOCOL=TCP)(HOST=ec2-dns)(PORT=8200)) ) ( CONNECT_DATA= (SID=ORCL) ) )
-
Next, create subdirectories in the GoldenGate directory by using the Amazon EC2 command line shell and
ggsci
, the GoldenGate command interpreter. The subdirectories are created under thegg
directory and include directories for parameter, report, and checkpoint files:prompt$ cd /gg prompt$ ./ggsci GGSCI> CREATE SUBDIRS
-
Create a
GLOBALS
parameter file using the Amazon EC2 command line shell. Parameters that affect all GoldenGate processes are defined in theGLOBALS
parameter file. The following example creates the necessary file:prompt$ cd $GGHOME prompt$ vi GLOBALS CheckpointTable oggadm1.oggchkpt
-
Configure the manager. Add the following lines to the
GLOBALS
file, and then start the manager by usingggsci
:PORT 8199 PurgeOldExtracts ./dirdat/*, UseCheckpoints, MINKEEPDAYS