4 Installing Classic Oracle GoldenGate for Oracle Database

This chapter includes the instructions for installing the Oracle GoldenGate Classic Architecturefor Oracle Database for the first time. Installing Oracle GoldenGate installs all of the components that are required to run and manage the processing (excluding any components required from other vendors, such as drivers or libraries) and it installs the Oracle GoldenGate utilities.

Topics:

4.1 Setting ORACLE_HOME and ORACLE_SID

Make certain that the ORACLE_HOME and ORACLE_SID system environment variables are set to the correct Oracle instance. The Oracle GoldenGate processes refer to them when connecting to the database.

Specifying Oracle Variables on UNIX and Linux Systems

Specifying Oracle Variables on Windows Systems

4.1.1 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;

4.1.2 Specifying Oracle Variables on Windows Systems

If there is one instance of Oracle on the system, the Registry settings for ORACLE_HOME and ORACLE_SID should be sufficient for Oracle GoldenGate. If those settings are incorrect in the Registry and cannot be changed, you can set an override as follows.

  1. On the Desktop or Start menu, right-click My Computer, and then select Properties.

  2. In Properties, click the Advanced tab.

  3. Click Environment Variables.

  4. Under System Variables, click New.

  5. For the Variable Name, enter ORACLE_HOME.

  6. For the Variable Value, enter the path to the Oracle binaries.

  7. Click OK.

  8. Click New again.

  9. For the Variable Name, enter ORACLE_SID.

  10. For the Variable Value, enter the instance name.

  11. Click OK.

If there are multiple Oracle instances on the system with Extract and Replicat processes connecting to them, use these steps:

  1. Use the preceding procedure (single Oracle instance on system) to set the ORACLE_HOME and ORACLE_SID system variables to the first Oracle instance.
  2. Start all of the Oracle GoldenGate processes that will connect to that instance.
  3. Edit the existing ORACLE_HOME and ORACLE_SID variables to specify the new information., then repeat the procedure for the next Oracle instance.
  4. Start the Oracle GoldenGate processes that will connect to that instance.
  5. Repeat the edit and startup procedure for the rest of the Oracle instances.

4.2 Database Requirements

This section contains Oracle GoldenGate requirements that are specific to the Oracle Database. These apply to both capture modes unless explicitly noted.

  • Classic Extract captures all the columns by default. These behaviors do not affect like to like replications. However, with a replication to data warehouse, all the columns might have to be updated. If you are using the DBMS_LOB.LOADFROMFILE procedure to update a LOB column only and your supplemental log is on all the columns, Integrated Extract captures the key columns and LOB improving performance.

    If you are converting from Classic Extract to Integrated Extract, you must use one of the following parameters to ensure that the Extract operates correctly:

    • Use KEYCOLS to add all columns (except LOB).

    • Use LOGALLSUPCOLS to control the writing of supplementally logged columns.

  • Ensure that your database has minimal supplemental logging enabled.

  • Database user privileges and configuration requirements are explained in Establishing Oracle GoldenGate Credentials in Using Oracle GoldenGate for Oracle Database.

  • If the database is configured to use a bequeath connection, the sqlnet.ora file must contain the bequeath_detach=true setting.

  • Oracle Databases must be in ARCHIVELOG mode so that Extract can process the log files.

4.3 Installing Oracle GoldenGate for Oracle Database

Oracle GoldenGate for Oracle Database is installed from the Oracle Universal Installer (OUI). OUI is a graphic installation program that prompts you for the input required to install the Oracle GoldenGate binaries and working files. It also sets the correct database environment that Oracle GoldenGate will operate in.

You can use OUI on any of the Linux, UNIX, and Windows platforms supported by OUI and Oracle GoldenGate.

An instance of Oracle GoldenGate can be installed for only one major Oracle Database version in any given Oracle home. For example, if you have Oracle Database 11.2 and 12.1, you must have separate Oracle GoldenGate installations for each one. This does not apply to data patch levels within the same major release. You can install multiple instances of Oracle GoldenGate for the same or different database versions on the same host.

The installer registers the Oracle GoldenGate home directory with the central inventory that is associated with the selected database. The inventory stores information about all Oracle software products installed on a host, provided the product was installed using OUI.

  1. Copy the Oracle GoldenGate installation file to the system and directory where you want to install Oracle GoldenGate, and then extract it

  2. Install using one of these installation methods:

  3. From this directory, run the GGSCI program, ggsci.exe. For Linux and UNIX, open a command shell to run ggsci.sh.

    For Windows, it may be necessary to run ggsci.exe as an Administrator based on the systems User Account Control settings. Right-click the executable file then select Run as administrator.

    Note:

    The path cannot contain any spaces.

  4. In GGSCI, issue the following command to create the Oracle GoldenGate working directories.

    CREATE SUBDIRS
    

4.3.1 Performing an Interactive Installation with OUI

The interactive installation provides a graphical user interface that prompts for the required installation information. These instructions apply to new installations as well as upgrades. However, to perform an upgrade to Oracle GoldenGate, follow the instructions in Upgrading Oracle GoldenGate, which includes a prompt to run OUI at the appropriate time.

  1. Expand the installation file.
  2. From the expanded directory, run the runInstaller program on UNIX or Linux, or run setup.exe on Windows.
  3. On the Select Installation Option page, select the Oracle GoldenGate version to install, and then click Next to continue.
  4. On the Specify Installation Details page, specify the following:
    • For Software Location, specify the Oracle GoldenGate installation directory. It can be a new or existing directory that is empty and has the amount of disk space shown on the screen or in the existing Oracle GoldenGate installation location (if you are upgrading an existing Oracle GoldenGate installation). The default location is under the installing user's home directory, but Oracle recommends changing it to a local directory that is not mounted and has no quotas. The specified directory cannot be a registered home in the Oracle central inventory. If installing in a cluster, install Oracle GoldenGate on local storage on each node in the cluster to provide high availability options for upgrading and software patching. See Installing Oracle GoldenGate Within a Cluster for more information about installing Oracle GoldenGate in a cluster.

    • (Optional) Select Start Manager to perform configuration functions, such as creating the Oracle GoldenGate subdirectories in the installation location, setting library paths, and starting Manager on the specified port number. To proceed, a database must exist on the system. When Start Manager is selected, the Database Location and Manager Port fields are displayed.

      • For Database Location, the database version in the specified location must be Oracle Database 12c if you are installing Oracle GoldenGate for Oracle Database 12c or Oracle Database 11g if you are installing Oracle GoldenGate for Oracle Database11g. The database must have a registered home in the Oracle central inventory. The installer registers the Oracle GoldenGate home directory with the central inventory.

      • For Manager Port, accept the default port number or enter a different unreserved, unrestricted port number for the Manager process to use for interprocess communication. The default port is the first available one starting with 7809. If you are installing multiple instances of Oracle GoldenGate on the same system, each must use a different port number.

    • Click Next to continue. If this is an upgrade to an existing Oracle GoldenGate installation, OUI prompts that the selected software location has files or directories. Click Yes.

  5. The Create Inventory page is displayed if this is the first Oracle product to be installed from OUI on a host that does not have a central inventory.
    • For Inventory Directory, specify a directory for the central inventory. It can be a new directory or an existing directory that is empty and has the amount of disk space shown on the screen. The directory cannot be on a shared drive.

    • Select an operating system group in which the members have write permission to the inventory directory. This group is used to add inventory information to the Oracle GoldenGate subfolder.

  6. On the Summary page, confirm that there is enough space for the installation and that the installation selections are correct. Optionally, click Save Response File to save the installation information to a response file. You can run the installer from the command line with this file as input to duplicate the results of a successful installation on other systems. You can edit this file or create a new one from a template. See Performing a Silent Installation with OUI.
  7. Click Install to begin the installation or Back to go back and change any input specifications. When upgrading an existing Oracle GoldenGate installation, OUI notifies you that the software location has files or directories. Click Yes to continue. You are notified when the installation is finished.
  8. If you created a central inventory directory, you are prompted to run the INVENTORY_LOCATION/orainstRoot.sh script. This script must be executed as the root operating system user. This script establishes the inventory data and creates subdirectories for Oracle GoldenGate.

4.3.2 Performing a Silent Installation with OUI

These instructions apply to new installations, as well as upgrades. However, to perform an upgrade to Oracle GoldenGate, follow the instructions in Overview of Upgrading Oracle GoldenGate, which include a prompt to run OUI at the appropriate time.

You can perform a silent installation from the command console if the system has no X-Windows interface or to perform an automated installation. Silent installations can ensure that multiple users in your organization use the same installation options when they install your Oracle products.

You perform a silent installation by running a response file. You can create a response file by selecting the Save Response File option during an interactive OUI session or by editing a template, as shown in Example 4-1. To run a response file, issue the following command.

-silent -nowait -responseFile absolute_path_to_response_file

The response files and the template are stored in the response subdirectory of the Oracle GoldenGate installation directory. The Oracle GoldenGate response file contains a standard set of Oracle configuration parameters in addition to parameters that are specific to Oracle GoldenGate. These parameters correspond to the fields in the interactive session.

Note:

If you are upgrading an existing Oracle GoldenGate installation with the silent option, you might get the following warning:

WARNING:OUI-10030:You have specified a non-empty directory to install this product. It is recommended to specify either an empty or a non-existent directory.
You may, however, choose to ignore this message if the directory contains Operating System generated files or subdirectories like lost+found. Do you want to proceed with installation in this Oracle Home?

Press ENTER to continue.

Example 4-1 Oracle GoldenGate Response File Template

####################################################################
## Copyright(c) Oracle Corporation 2018. All rights reserved.     ##
##                                                                ##
## Specify values for the variables listed below to customize     ##
## your installation.                                             ##
##                                                                ##
## Each variable is associated with a comment. The comment        ##
## can help to populate the variables with the appropriate        ##
## values.                                                        ##
##                                                                ##
## IMPORTANT NOTE: This file should be secured to have read       ##
## permission only by the oracle user or an administrator who     ##
## own this installation to protect any sensitive input values.   ##
##                                                                ##
####################################################################

#-------------------------------------------------------------------------------
# Do not change the following system generated value. 
#-------------------------------------------------------------------------------
oracle.install.responseFileVersion=/oracle/install/rspfmt_ogginstall_response_schema_v12_1_2


################################################################################
##                                                                            ##
## Oracle GoldenGate installation option and details                          ##
##                                                                            ##
################################################################################

#-------------------------------------------------------------------------------
# Specify the installation option.
# Specify ORA12c for installing Oracle GoldenGate for Oracle Database 12c or
#         ORA11g for installing Oracle GoldenGate for Oracle Database 11g 
#-------------------------------------------------------------------------------
INSTALL_OPTION=

#-------------------------------------------------------------------------------
# Specify a location to install Oracle GoldenGate
#-------------------------------------------------------------------------------
SOFTWARE_LOCATION=

################################################################################
##                                                                            ##
## Specify details to Create inventory for Oracle installs                    ##
## Required only for the first Oracle product install on a system.            ##
##                                                                            ##
################################################################################

#-------------------------------------------------------------------------------
# Specify the location which holds the install inventory files.
# This is an optional parameter if installing on
# Windows based Operating System.
#-------------------------------------------------------------------------------
INVENTORY_LOCATION=

#-------------------------------------------------------------------------------
# Unix group to be set for the inventory directory.  
# This parameter is not applicable if installing on
# Windows based Operating System.
#-------------------------------------------------------------------------------
UNIX_GROUP_NAME=

4.3.3 Specifying a Custom Manager Name for Windows

If you plan to install the Manager process as a Windows service and if either of the following is true, then you must specify a custom name for the Manager service:

  • You are installing the Manager as a Windows service and want to use a service name other then the default, which is GGSMGR.

  • You want to have multiple Manager processes running as Windows services on this system. Each Manager service on a system must have a unique name.

Specify a custom Manager service name:

  1. From the Oracle GoldenGate installation directory, run ggsci.exe from the Oracle GoldenGate directory.

  2. Issue the following command.

    EDIT PARAMS ./GLOBALS
    

    Note:

    The ./ portion of this command must be used, because the GLOBALS file must reside at the root of the Oracle GoldenGate installation file.

  3. In the file, add the following line, where name is a unique, one-word name for the Manager service.

    MGRSERVNAME name
    
  4. Save the file. The file is saved automatically with the name GLOBALS, but without a file extension. Do not move this file because it is used during installation of the Windows service and during data processing.

4.3.4 Installing Manager as a Windows Service

By default, Manager is not installed as a service and can be run by a local or domain account. However, when run this way, Manager will stop when the user logs out. When you install Manager as a service, you can operate it independently of user connections, and you can configure it to start manually or at system startup.

Installing Manager as a service is required on a Windows Cluster, but optional otherwise.

To install Manager as a Windows service:

  1. (Recommended) Log on as the system administrator.

  2. Click Start, then Run, and then type cmd in the Run dialog box.

  3. Go to the directory that contains the Manager program that you are installing as a service, then run the INSTALL utility with the following syntax:

    install option [...]
    

    Where option is one of the following:

    Table 4-1 INSTALL Utility Options

    Option Description

    ADDEVENTS

    Adds Oracle GoldenGate events to the Windows Event Manager.

    ADDSERVICE

    Adds Manager as a service with the name that is specified with the MGRSERVNAME parameter in the GLOBALS file, if one exists, or the GGSMGR default. The ADDSERVICE configures the service to run as the Local System account, the standard for most Windows applications because the service can be run independently of user logins and password changes. To run Manager as a specific account, use the USER and PASSWORD options.Foot 1

    The service is installed to start at system boot time (see AUTOSTART). To start it after installation, either reboot the system or start the service manually from the Services applet in the Control Panel.

    AUTOSTART

    Sets the service that is created with ADDSERVICE to start at system boot time. This is the default unless MANUALSTART is used.

    MANUALSTART

    Sets the service that is created with ADDSERVICE to start manually through GGSCI, a script, or the Services applet in the Control Panel. The default is AUTOSTART.

    USER name

    Specifies a domain user account that executes Manager. For the name, include the domain name, a backward slash, and the user name, for example HEADQT\GGSMGR .

    By default, the Manager service is installed to use the Local System account.

    PASSWORD password

    Specifies the password for the user that is specified with USER.

    Footnote 1

    A user account can be changed by selecting the Properties action from the Services applet of the Windows Control Panel.

  4. If Windows User Account Control (UAC) is enabled, you are prompted to allow or deny the program access to the computer. Select Allow to enable the INSTALL utility to run.

    The INSTALL utility installs the Manager service with a local system account running with administrator privileges. No further UAC prompts will be encountered when running Manager if installed as a service.

Note:

If Manager is not installed as a service, Oracle GoldenGate users will receive a UAC prompt to confirm the elevation of privileges for Manager when it is started from the GGSCI command prompt. Running other Oracle GoldenGate programs also returns a prompt.