This recipe will go through the process of downloading and installing OGG on Unix.
You could obtain the OGG software either from http://otn.oracle.com (click on the DOWNLOADS tab, scroll down to the Middleware section, and click on GoldenGate) for trial purposes, or if you have a valid email / password account go to My Oracle Support and buy a license to use OGG, from http://edelivery.oracle.com.
In this example, both source and target environments are of identical configurations. Of course, in real-world examples, there will be mixed platform configurations as well. The configuration used in this example is as follows:
Platform: AIX
Operating System Version: 6.1
Database Version: Oracle 11.2.0.3.0
GoldenGate Version: 11.2.1.0.1
Steps for installing Oracle GoldenGate on the source host are as follows:
Log in to the source host as the "oracle" user.
Create an installation directory to host the OGG binaries. I'm using a sandbox; ideally, you'll have a specific mount point for OGG. We do it using the following command:
$ mkdir –p /u01/app/oracle/gg
Change the directory to the top level directory of your software installation, as follows:
$ cd /u01/app/oracle/gg
Download the OGG software to the download directory created in step 3.
When you download the OGG software, make sure you choose the correct software for your operating system and database version from either Oracle Technology Network (OTN) or Oracle eDelivery.
After downloading the ZIP file for AIX, we do the listing of directory contents by using the following command:
$ ls –l
The output of the preceding command will be as follows:
-rw-r--r-- 1 oracle oinstall 49963147 Nov 14 13:51 ogg112101_ggs_AIX_ppc_ora11g_64bit.zip
Now we're ready to inflate the ZIP file, we do it by using following command:
$ unzip ogg112101_ggs_AIX_ppc_ora11g_64bit.zip
The output of the preceding command will be as follows:
Archive: ogg112101_ggs_AIX_ppc_ora11g_64bit.zip inflating: ggs_AIX_ppc_ora11g_64bit.tar inflating: OGG_WinUnix_Rel_Notes_11.2.1.0.1.pdf inflating: Oracle GoldenGate 11.2.1.0.1 README.doc inflating: Oracle GoldenGate 11.2.1.0.1 README.txt
The inflated files contain another tar file which contains the actual software distribution. We need to untar this file, using the following command:
$ tar xvf ggs_AIX_ppc_ora11g_64bit.tar
Complete untaring the file. You now have successfully installed the OGG distribution.
Next we need to ensure we set up our environment variables accordingly. In your current shell, you need to export the following variables:
$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 $ export ORACLE_SID=SRC100
We would now be setting the library path for AIX. For AIX systems, this export is mandatory and is done by using the following command:
$ export LIBPATH="${ORACLE_HOME}/lib
Next step is to invoke Oracle GoldenGate to create the
subdirs
directories where the parameter files, trail files, temp directory, traces, and so on will be stored. Change the directory to your OGG home and create the following subdirectories:$ cd /u01/app/oracle/gg $ ./ggsci GGSCI> create subdirs
The output of the preceding commands will be as follows:
Creating subdirectories under current directory /u01/app/oracle/gg Parameter files /u01/app/oracle/gg/dirprm: already exists Report files /u01/app/oracle/gg/dirrpt: created Checkpoint files /u01/app/oracle/gg/dirchk: created Process status files /u01/app/oracle/gg/dirpcs: created SQL script files /u01/app/oracle/gg/dirsql: created Database definitions files /u01/app/oracle/gg/dirdef: created Extract data files /u01/app/oracle/gg/dirdat: created Temporary files /u01/app/oracle/gg/dirtmp: created Stdout files /u01/app/oracle/gg/dirout: created
At this stage we have completed the OGG installation, we now exit the installation using the following command:
GGSCI> exit
The steps for installing Oracle GoldenGate in the target host are the same as the preceding steps. Repeat the steps from 1 to 13 in your target host.
In order to download the correct Oracle GoldenGate version for your platform and database you must know your operating system version and chipset (x86, x86 64bit, IA64, and so on) including your database version and kernel bit information (32-bit or 64-bit).
After you have downloaded the software and installed it, you need to update your environment settings. Make sure you do this on the target host as well.
You need to ensure you have your ORACLE_HOME
and ORACLE_SID
variables set accordingly in your environment.
If you're using the Korn Shell/Bourne Shell then you can set these in your .profile
file. If you're using the Bash shell, then you can update your .bash_profile
file. For example, we perform the update using the following command:
$ vi .bash_profile
And add the following command lines to the file:
export ORACLE_HOME="/u01/app/oracle/product/11.2.0/db_1" export ORACLE_SID="SRC100" export LIBPATH="{ORACLE_HOME}/lib"
Then save the file and exit.
LIBPATH
was used in our preceding recipe that is specific to AIX. For other platforms, the shared libraries are referenced in the following table:
Platform |
Environment variable |
---|---|
HP-UX |
|
Sun Solaris HP True64 (OSF/1) Linux |
|
In 64-bit platforms with 32-bit Oracle databases, OGG requires the LD_LIBRARY_PATH
variable to include the 32-bit Oracle libraries.
When Oracle GoldenGate and the database are running on the same server, the following software must have the same bit type; all either 32-bit, 64-bit, or IA64:
Oracle library versions
Oracle GoldenGate version
Database versions
When Oracle GoldenGate connects remotely to the database server via SQL*Net, the following processes are required:
Extract
Replicat
The Oracle client library and the Oracle GoldenGate build of both Extract and Replicat processes must have the same Oracle version, bit type, and operating system version.