1. Preparation
Our first step is preparing the box for our test replication. I am using a VMWare virtual server for my tests.
Install linux x64 on your box. I used Linux Centos 5.3. The hostname for our source box will be db1.
Install the Oracle software on the box. I am using Oracle 11gr2 for test purposes. The software from can be found on otn.oracle.com. Unzip and install it.
Oracle software installation:
Copy the two zip files to some location on the machine and unzip them:
[oracle@db1 distr]$ export DISTR=/u01/app/oracle/distr
[oracle@db1 distr]$ cd $DISTR
[oracle@db1 distr]$ unzip linux.x64_11gR2_database_1of2.zip
[oracle@db1 distr]$ unzip linux.x64_11gR2_database_2of2.zip
Edit response file for silent installation:
[oracle@db1 distr]$ vi $DISTR/database/response/db_install.rsp
[oracle@db1 distr]$ cd $DISTR/database
Set proper parameter for kernel, create necessary user and groups and set limits for the Oracle owner. (I used the oracle user for this).
Install the software:
[oracle@db1 database]$ ./runInstaller -silent -responseFile $DISTR/database/response/db_install.rsp
[oracle@db1 ~]$ su - root
[root@db1 ~]# /u01/app/oracle/product/11.2.0/db_1/root.sh
Create a test database:
[oracle@db1 ~]$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
[oracle@db1 ~]$ export PATH=$ORACLE_HOME/bin:$PATH
[oracle@db1 ~]$ dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbName base11r2 -sysPassword qwerty -systemPassword qwerty -emConfiguration NONE -datafileDestination /u01/app/oracle/oradata -storageType FS
Start the listener and set up a network alias:
[oracle@db1 ~]$ lsnrctl start
[oracle@db1 ~]$ vi $ORACLE_HOME/network/admin/tnsnames.ora
2. Install
With the database created, we can install GoldenGate software to the box:
Get the GG software from OTN. We need “Oracle GoldenGate v10.4.0.x for Oracle 10g 64bit on Redhat 4.0″. The file has size is 27 Mb. It is officially intended for RHEL 4.0 x86-64, but it works fine on OEL 5.3 x86-64 and on Centos 5.3 x86-64.
Create directory for the software and extract it to the directory:
[oracle@db1 product]$ mkdir /u01/app/oracle/product/gg
[oracle@db1 product]$ export GGATE=/u01/app/oracle/product/gg
[oracle@db1 product]$ cd $GGATE
[oracle@db1 gg]$ unzip V18157-01.zip
Archive: V18157-01.zip
inflating: ggs_redhatAS40_x64_ora10g_64bit_v10.4.0.19_002.tar
[oracle@db1 gg]$ tar -xf ggs_redhatAS40_x64_ora10g_64bit_v10.4.0.19_002.tar
If you are using Oracle 11gr1 or 11gr2, make a symbolic link . . .
[oracle@db1 gg]$ ln -s /u01/app/oracle/product/11.2.0/db_1/lib/libnnz11.so /u01/app/oracle/product/11.2.0/db_1/lib/libnnz10.so
. . . and the path to the GG libraries to LD_LIBRARY_PATH:
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/u01/app/oracle/product/gg
Now we can start GG command line utility to make sure it works.
[oracle@db1 gg]$ ./ggsci
You should now get the prompt to the GoldenGate command line interface:
Oracle GoldenGate Command Interpreter for Oracle
Version 10.4.0.19 Build 002
Linux, x64, 64bit (optimized), Oracle 10 on Sep 22 2009 14:18:08
Copyright (C) 1995, 2009, Oracle and/or its affiliates. All rights reserved.
GGSCI (db1) 1>
Create the necessary working directories for GG.
[oracle@db1 gg]$ ./ggsci
GGSCI (db1) 1>create subdirs
GGSCI (db1) 1>exit
[oracle@db1 gg]$ mkdir $GGATE/discard
The GoldenGate software has been successfully installed to the box d