2.3 Setting Library Paths for Dynamic Builds on UNIX

Oracle GoldenGate uses shared libraries. When you install Oracle GoldenGate on a UNIX system, the following must be true before you run GGSCI or any other Oracle GoldenGate process.

  1. Make certain that the database libraries are added to the shared-library environment variables of the system. This procedure is usually performed at database installation time. Consult your Database Administrator if you have any questions.

    When Oracle GoldenGate is running on the same server as the database, all of the following must be 64-bit:

    • Oracle library versions

    • Oracle GoldenGate version

    • Database versions

    When Oracle GoldenGate connects remotely to the database server through SQL*Net, the following are required:

    • Replicat: The Oracle client library and the Oracle GoldenGate build must have the same Oracle version, bit type (64-bit or IA64), and operating system version.

    • Extract: The Oracle client library and the Oracle GoldenGate build must have the same Oracle version, bit type (64-bit or IA64), and operating system version. In addition, both operating systems must be the same endian.

  2. If you will be running an Oracle GoldenGate program from outside the Oracle GoldenGate installation directory on a UNIX system:
    • (Optional) Add the Oracle GoldenGate installation directory to the PATH environment variable.

    • (Required) Add the Oracle GoldenGate installation directory to the shared-libraries environment variable.

    For example, given an Oracle GoldenGate installation directory of /users/ogg, the second command in the following example requires these variables to be set:


    Command Requires GG libraries in environment variable?

    $ users/ogg > ./ggsci

    No

    $ users > ./ogg/ggsci

    Yes


Example 2-1 To Set the Variables in Korn Shell

PATH=installation_directory:$PATH
export PATH
shared_libraries_variable=absolute_path_of_installation_directory:$shared_libraries_variable
export shared_libraries_variable

Example 2-2 To Set the Variables in Bourne Shell

export PATH=installation_directory:$PATH
export shared_libraries_variable=absolute_path_of_installation_directory:$shared_libraries_variable

Example 2-3 To Set the Variables in C Shell

setenv PATH installation_directory:$PATH
setenv shared_libraries_variable absolute_path_of_installation_directory:$shared_libraries_variable

Where shared libraries variable is one of the variables shown in Table 2-1:


Table 2-1 UNIX/Linux Library Path Variables Per Platform

Platform Environment variable

IBM AIX

LIBPATH

HP-UX

LD_LIBRARY_PATH

Sun Solaris

LINUX

LD_LIBRARY_PATHFoot 1


Footnote 1

In 64-bit environments with 32-bit Oracle Databases, Oracle GoldenGate requires the LD_LIBRARY_PATH to include the 32-bit Oracle libraries.

The following is an example of how to set the path in Bourne shell:

export LD_LIBRARY_PATH=/ggs/11.0:$LD_LIBRARY_PATH

Note:

To view the libraries that are required by an Oracle Oracle GoldenGate process, use the ldd goldengate_process shell command before starting the process. This command also shows an error message for any that are missing.