
Having satisfied all the necessary prerequisities, you are now ready to install the GoldenGate software. The next paragraphs offer a step-by-step guide to the installation process.
To use GoldenGate software you must install it on both source and target systems. When installing GoldenGate on Linux or UNIX, it is highly recommended that the software is installed by the Oracle user. To install, follow these simple steps:
- Extract the Oracle GoldenGate Mediapack zipped file on a Windows system by using WinZip or an equivalent file compression product. This produces a UNIX tar file.
- FTP the tar file in binary mode to the UNIX system (database server) and directory where you want GoldenGate to be installed.
- Log on using telnet or ssh client to the database server as the Oracle user.
Tip
Ensure you have your Oracle environment variables set correctly, including
LD_LIBRARY_PATH
defined.For example, if using bash or korn shell set the variable as follows:
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
To make the environment variable setting persistent, define them in the
.bashrc
(bash shell) or.profile
(korn shell) files. An example.bashrc
file is shown next:# .bashrc # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # User specific aliases and functions ORACLE_SID=oltp ORACLE_BASE=/opt/oracle ORACLE_HOME=$ORACLE_BASE/app/product/11.1.0/db_1 LD_LIBRARY_PATH=$ORACLE_HOME/lib PATH=$PATH:$ORACLE_HOME/bin:. export ORACLE_SID ORACLE_BASE ORACLE_HOME PATH LD_LIBRARY_PATH
- Extract the tar file. The GoldenGate files are extracted into the current working directory.
tar -xvof <filename>.tar
- Change directories to the new GoldenGate directory.
cd ggs
- From the GoldenGate directory, run the GoldenGate Software Command line Interpreter (GGSCI) program.
ggsci
- In GGSCI, issue the CREATE SUBDIRS command to create the GoldenGate working directories.
GGSCI (dbserver1) 1> CREATE SUBDIRS
- Issue the following command to exit GGSCI:
Example:
[oracle@dbserver1 ~]$ cd ggs [oracle@dbserver1 ggs]$ tar -xvof ggs_redhatAS50_x86_ora11g_32bit_v10.4.0.19_002.tar [oracle@dbserver1 ~]$ ggsci Oracle GoldenGate Command Interpreter for Oracle Version 10.4.0.19 Build 002 Linux, x86, 32bit (optimized), Oracle 11 on Sep 29 2009 08:50:50 Copyright (C) 1995, 2009, Oracle and/or its affiliates. All rights reserved. [oracle@dbserver1 ggs]$ ggsci Oracle GoldenGate Command Interpreter for Oracle Version 10.4.0.19 Build 002 Linux, x86, 32bit (optimized), Oracle 11 on Sep 29 2009 08:50:50 Copyright (C) 1995, 2009, Oracle and/or its affiliates. All rights reserved. GGSCI (dbserver1.mydomain.com) 1> create subdirs Creating subdirectories under current directory /home/oracle/ggs Parameter files /home/oracle/ggs/dirprm: created Report files /home/oracle/ggs/dirrpt: created Checkpoint files /home/oracle/ggs/dirchk: created Process status files /home/oracle/ggs/dirpcs: created SQL script files /home/oracle/ggs/dirsql: created Database definitions files /home/oracle/ggs/dirdef: created Extract data files /home/oracle/ggs/dirdat: created Temporary files /home/oracle/ggs/dirtmp: created Veridata files /home/oracle/ggs/dirver: created Veridata Lock files /home/oracle/ggs/dirver/lock: created Veridata Out-Of-Sync files /home/oracle/ggs/dirver/oos: created Veridata Out-Of-Sync XML files /home/oracle/ggs/dirver/oosxml: created Veridata Parameter files /home/oracle/ggs/dirver/params: created Veridata Report files /home/oracle/ggs/dirver/report: created Veridata Status files /home/oracle/ggs/dirver/status: created Veridata Trace files /home/oracle/ggs/dirver/trace: created Stdout files /home/oracle/ggs/dirout: created GGSCI (dbserver1.mydomain.com) 2> exit
The GGSCI commands are not case sensitive, but do support wildcards (*) where appropriate.
- When using Oracle Automatic Storage Manager (ASM) as the storage solution for your database, ensure you have a TNS entry configured for the ASM instance in the
tnsnames.ora
file on the source database server.
The database server's tnsnames.ora
file can be found in the following directory:
$ORACLE_HOME/network/admin
An example tnsnames.ora
entry is shown next:
ASM = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = dbserver1)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SID = +ASM) ) )
In step 7 of the installation, we create subdirectories beneath the GoldenGate home. These are the default locations that can be moved, for example, to a Storage Area Network (SAN). The subdirectory names and what specific files they contain are described below.
The dirchk
subdirectory is the default location for checkpoint files created by the Extract and Replicat processes that provide data persistence of read and write operations. The file name format is <group name><sequence number>.<file extension>
.
A group is a processing group consisting of either an Extract or Replicat, its parameter file, its checkpoint file, and any other files associated with the process. The group name can be up to eight characters including non-alphanumeric.
The file extension is cpe
for Extract checkpoint files or cpr
for Replicat checkpoint files.
The dirdat
subdirectory is the default location for GoldenGate trail files and extract files created by the Extract processes. These files are subsequently processed by either a Replicat process or another application or utility.
The file name format for trail files is < prefix> <sequence number>
The prefix must be two alphanumeric characters specified during Extract or Replicat creation. Typical prefix names are as follows:
- sa, sb, sc etc for the 1st, 2nd and 3rd trail files on the source
- ta, tb, tc etc for the 1st, 2nd and 3rd trail files on the target
A 6-digit sequential number is automatically appended to each file prefix for each new trail file created.
The filename for extract files is user-defined name and has no sequence number.
Tip
This subdirectory can fill up very quickly during Extract processing. The default size of trail files is 10M. Ensure that adequate space is available in the filesystem to prevent the Extract process(es) from abending. Processed trail files can be purged periodically as part of the GoldenGate manager configuration.
The dirdef
subdirectory is the default location for data definition files created by the DEFGEN utility. These ASCII files contain source or target data definitions used in a heterogeneous synchronization environment.
The file name format is user-defined and specified explicitly in the DEFGEN parameter file. Typically the DEFGEN data file is called defs.dat
.
The dirpcs
subdirectory is the default location for process status files. These files are only created while a process is running. The file shows the program and process name, the port, and process ID.
The file name format is <group name>.<file extension>
.
The file extension is pce
for Extract, pcr
for Replicat, or pcm
for Manager processes.
The dirprm
subdirectory is the default location for GoldenGate parameter files created by administrators configuring run-time parameters for GoldenGate process groups or utilities. These ASCII files are generally edited through the GGSCI utility but can be edited directly.
The file name format is <group name/user-defined name>.prm
or mgr.prm
.
The dirrpt
subdirectory is the default location for report files created by Extract, Replicat, and Manager processes. These ASCII files report statistical information relating to a processing run. When a process abends the file is updated automatically. However, to obtain process statistics "on the fly", the REPORT command must be invoked from within the GGSCI tool.
The file name format is <group name><sequence number>.rpt
.