How To Install and Configure Oracle Golden Gate
How To Install and Configure Oracle Golden Gate
Setup
A.- Topology
I have installed Oracle VirtualBox 5.0.2 on my computer. I have created two virtual servers which contain Oracle
Enterprise Linux 6.7 x86-64 and Oracle Database 12c, version: 12.1.0.2. The Oracle Golden Gate I installed is
version: 12.1.2.1.
The stage and target databases reside on the same server for simplicity. In this blog I will focus on Oracle Golden
Gate initial setup on both source database dbsrc and target database stgdb.
I moved the file 121210_fbo_ggs_Linux_x64_shiphome.zip to source and target server andunzipped the file.
At this point one has to check that the following environment variables are set on source server:
- ORACLE_HOME = /db0/oracle/product/12.1.0.2/db_1
- ORACLE_SID = dbsrc
- ORACLE_HOME = /db0/oracle/product/12.1.0.2/db_1
- ORACLE_SID = stgdb
The images below show the installation of Oracle Golden Gate on source server and the same installation should be
performed on target server.
Press Next:
Specify the home of Oracle Golden Gate. Choose an Oracle_Home different from the one of the Oracle database
and press Next:
Then press Install.
Press Close.
At this point the OGG software is installed on source and target servers.
1.- Update LD_LIBRARY_PATH in the profile file on both source and target servers.
# .bash_profile
PATH=$PATH:$HOME/bin
export PATH
# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=srcdb.localdomain
export ORACLE_UNQNAME=dbsrc
export ORACLE_BASE=/db0/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0.2/db_1
export ORACLE_GG_HOME=$ORACLE_BASE/product/12.1.2.1/ogg_1
export ORACLE_SID=dbsrc
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_GG_HOME:$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
And the .bash_profile on target server should look similar, but the variables ORACLE_UNQNAME and
ORACLE_SID have to be set to stgdb to reflect the target database.
Log on source database as sys. I use Oracle SQLDeveloper which gives a nice graphical interface against the
database:
4.- Create Oracle Golden Gate user on source and target databases:
exec DBMS_GOLDENGATE_AUTH.GRANT_ADMIN_PRIVILEGE('ogg_user');
Then the parameter manager file on source server should look like this:
PORT 7809
PurgeOldExtracts /db0/oracle/product/12.1.2.1/ogg_1/dirdat/* UseCheckPoints, MinKeepHours 48
Then the parameter manager file on target server should look like this:
PORT 7809
Run the following commands on Golden Gate interface ggsci. The connect string dbsrc below is the tnsnames of the
source database.
Similarly the commands on Golden Gate interface ggsci on target server are:
At this point the inital Oracle Golden Gate setup is completed and ready on source and target database servers.