Specifying Oracle Variables on UNIX and Linux Systems

If there is one instance of Oracle Database on the system, set the ORACLE_HOME and ORACLE_SID environment variables at the system level. If you cannot set them that way, use the following SETENV statements in the parameter file of every Extract and Replicat group that will be connecting to the instance. The SETENV parameters override the system settings and allow the Oracle GoldenGate process to set the variables at the session level when it connects to the database.

SETENV (ORACLE_HOME = path_to_Oracle_home_location)

SETENV (ORACLE_SID = SID)

If there are multiple Oracle instances on the system with Extract and Replicat processes connecting to them, you must use a SETENV statement in the parameter file of each process group. As input to the SETENV parameter, use the ORACLE_HOME and ORACLE_SID environment variables to point Oracle GoldenGate to the correct Oracle instance. For example, the following parameter file excerpts shows two Extract groups, each capturing from a different Oracle instance.

Group 1:

EXTRACT edbaa
SETENV (ORACLE_HOME = "/home/oracle/ora/product")
SETENV (ORACLE_SID = "oraa")
USERIDALIAS tiger1
RMTHOST sysb
RMTTRAIL /home/ggs/dirdat/rt
TABLE hr.emp;
TABLE hr.salary;

Group 2:

EXTRACT orab
SETENV (ORACLE_HOME = "/home/oracle/ora/product")
SETENV (ORACLE_SID = "orab")
USERIDALIAS tiger1
RMTHOST sysb
RMTTRAIL /home/ggs/dirdat/st
TABLE fin.sales;
TABLE fin.cust;