SETENV
Valid For
Extract and Replicat.
Any SETENV values should be set before any
USERIDALIAS, FETCHUSERIDALIAS, TRANLOGOPTIONS
MININGUSER, MININGUSERIDALIAS entries in the parameter files.
Description
Use the SETENV parameter to set a value for an environment variable. When Extract or Replicat starts, it uses the specified value instead of the one that is set in the operating system environment. A variable set in the SETENV statement overrides any existing variables set at the operating system level. Use one SETENV statement per variable to be set.
USERNAME: Database login user name-
OSUSERNAME: Operating System user name -
MACHINENAME: Name of the host, machine, or server where the database is running -
PROGRAMNAME: Name of program or application that started the transaction or session -
CLIENTIDENTIFIER: Value set usingDBMS_SESSION.set_identifier()
SETENV cannot be used with query parameters.
Default
None
Syntax
SETENV (
{environment_variable | TZ}
= 'value'
)-
environment_variable -
The name of the environment variable to be set.
-
TZ -
(MySQL only) When running Oracle GoldenGate for MySQL on a Windows server or on a Linux server which is on a remote host from the database server, use the
SETENVparameter within the Extract parameter file to set the timezone to match the one in the database server. The following is the supported format of time zone values for the TZ option:SETENV(TZ='tzn [+|-]hh[:mm[:ss]][dzn]') tzn - Three-letter time-zone name, such as PST. You must specify the correct offset from local time to UTC. hh - Difference in hours between UTC and local time. Sign (+) optional for positive values. mm - Minutes. Separated from hh by a colon (:). ss - Seconds. Separated from mm by a colon (:). dzn - Three-letter daylight-saving-time zone such as PDT. If daylight saving time is never in effect in the locality, set TZ without a value for dzn. The C run-time library assumes the United States' rules for implementing the calculation of daylight saving time (DST).The offset is positive if the local time zone is west of the Prime Meridian and negative if it is East. The hour must be between 0 and 24, and the minute and seconds between 0 and 59.
-
'value' -
A value for the specified variable. Enclose the value within single quotes.
Examples
- Example 1
-
Using separate
SETENVstatements allows a single instance of Oracle GoldenGate to connect to multiple Oracle database instances without having to change environment settings. The following parameter statements set a value forORACLE_HOMEandORACLE_SID.SETENV (ORACLE_HOME = '/home/oracle/ora9/product') SETENV (ORACLE_SID = 'ora9')