4 Upgrading Oracle GoldenGate Monitor Agent

Use this step by step process to upgrade your Oracle GoldenGate Monitor Agent from 11g to 12c or to upgrade the original JAgent that was delivered with 12c.

Note:

Do not follow the instructions in this chapter if you have installed Oracle GoldenGate Monitor Agent 12c for the first time; the upgrade occurs automatically.

Use the following tasks to upgrade your existing Oracle GoldenGate Monitor Agent($OGG_HOME/dirjar) 11g to 12c:

Task 1   Obtain Oracle GoldenGate Monitor Agent

Obtain the product distribution by following the instructions in Downloading Oracle GoldenGate Monitor Agent.

Task 2   Backup the Existing Oracle GoldenGate Monitor Agent

Create a backup copy of your entire pre-upgrade Oracle GoldenGate Monitor Agent environment before you upgrade by copying the following to a backup location:

  • OGG_HOME/cfg directory

  • OGG_HOME/dirjar directory

  • OGG_HOME/pw_agent_util.* files

  • OGG_HOME/jagent.* files

  • OGG_HOME/dirwlt directory

Task 3   Configuring the JRE

Configure your JRE as follows:

  1. Set your $JAVA_HOME environment variable to use your installed JRE.

  2. Set $JAVA_HOME/bin first in your $PATH environment variable.

  3. Verify that $JAVA_HOME and $JAVA_HOME/bin are setup correctly by running the following command:

    java -version

    The Java version is displayed and should be similar to the following:

    java version "1.8.0_40"
    Java(TM) SE Runtime Environment (build 1.8.0_40-b19)
    Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)
    
Task 4   Installing Oracle GoldenGate Monitor Agent

Install Oracle GoldenGate Monitor Agent in a separate, standalone location using the instructions in one of the following dependent on your database:

For non-z/OS platforms, use Installing and Configuring Oracle GoldenGate Monitor Agent.

For z/OS platforms, use Installing and Configuring Oracle GoldenGate Monitor Agent for z/OS and DB2 for i.

Task 5   Stopping JAgent

Go to the Oracle GoldenGate Core GGSCI terminal and stop the Oracle GoldenGate Monitor Agent by executing the stop jagent command:

GGSCI>stop jagent

Verify that there are no remaining jagent processes after by running the following command:

ps -ef |grep jagent

Use the kill -9 command to stop if any stray jagent processes.

Task 6   Copying Files to the New Agent Directories

Copy the existing $Monitor_Server_Domain/config/monitorserver/cfg directory, including all content, to the new Agent directory, $AGENT_HOME/cfg_templates.

Task 7   Creating the Instance

Use one of the following subsections to either create or upgrade your Monitor instance:

11g Upgrades: Creating a New Instance

Create a new instance using the instructions in one of the following dependent on your operating system:

For non-z/OS platforms, use Create the Oracle GoldenGate Monitor Agent Instance.

For z/OS platforms, use Create the Instance.

This modifies the $OGG_HOME/dirprm/jagent.prm file as in the following example:

COMMAND java -Dconfig.dir=/home/oracle/oggmon_agent/oggmon/cfg -Djava.util.logging.config.class=oracle.core.ojdl.logging.LoggingConfiguration -Doracle.core.ojdl.logging.config.file=/home/oracle/oggmon_
agent/oggmon/cfg/logging-config.xml -Doracle.core.ojdl.logging.componentId=JAGENT -jar -Xms512m -Xmx1024m /home/oracle/oggmon_agent/oggmon/ogg_agent/dirjar/jagent.jar

In this example, the jagent that will now be used is in /home/oracle/oggmon_agent/oggmon/ogg_agent/dirjar/jagent.jar and its configuration file is in the /home/oracle/oggmon_agent/oggmon/cfg directory.

12c Upgrades: Upgrading the Existing Instance

Run the Monitor Agent upgrade utility by entering the following command:

  1. Go to the $AGENT_HOME directory. For example:

    cd /u01/app/oracle/product/wls/oggmon/ogg_agent
    
  2. Run the upgrade script:

    For this Operating System Use this command

    Unix

    $ ./upgradeToMonitorAgent1221.sh From JAgent Version
    

    Windows

    C:\ upgradeToMonitorAgent1221.bat From JAgent Version
    

    For example: To upgrade from version 12.2.1.0.0 to version 12.2.1.2.0 use the command ./upgradeToMonitorAgent1221.sh 12.2.1.0.0

    Note:

    An error is displayed if the JAgent version is not provided.

    The system responds:

    Please enter absolute path of Oracle GoldenGate home directory: 
    
  3. Enter the absolute path to your Oracle GoldenGate home directory. For example, /u01/ogg/replication/oggcore1.

    The system responds:

    Please enter absolute path of OGG Agent instance : 
    
  4. Enter the directory that contains your Oracle GoldenGate Monitor Agent instance, which can be an existing directory. For example, /u01/ogg/agents/oggmon/agent1. This directory should be different than the Oracle GoldenGate home directory to avoid overwriting your Oracle GoldenGate Monitor Agent JAR and configuration files the next time you install or patch Oracle GoldenGate.

    Note:

    For Windows, you must ensure that you provide the absolute JDK8 directory path explicitly or the Monitor Agent cannot connect to the Monitor server. This directory path can also be defined in the jagent.prm file.

    The Oracle GoldenGate Monitor Agent Instance directory can be an existing directory location. In that case, you are prompted:

    OGG Agent instance directory already exists, do you want to overwrite the contents (yes | no)". 
    

    If you choose yes, the execution of the script will continue and all the contents related to Oracle GoldenGate Monitor Agent will be overwritten on that location. If you choose no, the execution of the script will stop.

    The system responds:

    Please enter unique name to replace timestamp in startMonitorAgent script.
    
  5. Enter the unique name that you want to replace the timestamp in the startMonitorAgent.sh script file.

Once the Monitor Agent upgrade completes successfully, the Monitor Agent wallet credentials are also updated.

Note:

If you want to install a second instance of the JAgent, then ensure to remove $OGG_HOME/dirprm/jagent.prm, and then run the CreateMonitorAgentInstance.sh script again.
Task 8   Starting the Agent

Go to the Oracle GoldenGate Core GGSCI terminal and restart the Oracle GoldenGate Monitor Agent by executing the following commands:

stop manager
start manager
start jagent

Monitor the new Agent log file, $AGENT_HOME/logs/ogg_agent.log and resolve any issues.

If you are using the Oracle GoldenGate EM Plug-in, after jagent starts correctly you must restart the Oracle Enterprise Manager (OEM) Agent then login to the OEM 12c console to ensure that the out of sync status issues for Oracle GoldenGate registered targets are resolved.

Task 9   Removing the Previous Oracle GoldenGate Monitor Agent Software

Remove the previous Oracle GoldenGate Monitor Agent software that was bundled with Oracle GoldenGate Software by deleting the following:

  • OGG_HOME/cfg directory

  • OGG_HOME/dirjar directory

  • OGG_HOME/pw_agent_util.* files

  • OGG_HOME/jagent.* files

  • (Optional) If you do not store anything related to Oracle GoldenGate Instance in Oracle Wallet, then delete the OGG_HOME/dirwlt directory.