Oracle GoldenGate - Deployments: Switchover

Oracle GoldenGate - Deployments: Switchover

Oracle GoldenGate Deployments: Switchover

 

Author: Bobby Curtis, MBA

 

Date: August 17, 2023

 

Organization: RheoData

Table of Contents

INTRODUCTION:

PREREQUISITES

STEP 1: EXPORT DEPLOYMENT VAR AND ETC HOMES

STEP 2: STOP SERVICEMANAGER

STEP 3: VERIFY STOPPAGE

STEP 4: FAILOVER THE NFS MOUNT POINT TO PASSIVE NODE

Step 4.1: Unmount /gg_data on Active Node

Step 4.2: Mount /gg_data on Passive Node

STEP 5: START SERVICEMANAGER ON PASSIVE NODE

CONCLUSION:

 


 

Introduction:

With an active/passive configuration of Oracle GoldenGate, the deployments that are associated with the installations must be manually failed over.  To failover, there are steps that need to be followed.  This document will provide the steps needed to failover an active/passive configuration in a manual way.

 

Prerequisites

 

For this configuration, we will be using an NFS mount point called /gg_data.  This mount point will be the location where the deployments are stored, enabling an active/passive configuration for Oracle GoldenGate.

Step 1: Export deployment VAR and ETC homes

 

Each deployment has a ETC and VAR directories.  These directions are use for various settings within Oracle GoldenGate.  In order to stop deployments, the following environment variables must be configured on both the active and passive servers.

 

To set these environment variables, the following needs to be done:

 

$ export OGG_ETC_HOME=/gg_data/ServiceManager/etc

$ export OGG_VAR_HOME=/gg_data/ServiceManager/var

 

In the example above, will set the ETC and VAR homes for the ServiceManager.  To set these environment variables for other deployments, change the ServiceManager name to the deployment name.

 

Step 2: Stop ServiceManager

To failover, the ServiceManager and all the deployments that it manages must be stopped.  This process is done by executing stopSM.sh from the bin directory in the ServiceManager deployment home.

 

$ cd /gg_data/ServiceManager/bin

$ ./stopSM.sh

Stopping Service Manager process (PID: 47543)...

Service Manager stopped

Step 3: Verify Stoppage

After stopping the ServiceManager, the OS needs to be checked for any running deployments and deployments need to be terminated. 

 

The first thing to do is to confirm the ServiceManager is stopped.

 

$ ps -ef | grep -i servicemanager

oracle     48661   47819  0 03:37 pts/0    00:00:00 grep --color=auto -i servicemanager

If the result set returns services still running, these processes must be stopped as well. These services indicate that a deployment is still running. 

 

ps -ef | grep -i servicemanager

oracle     48686       1  4 03:38 ?        00:00:00 /app/oracle/21.10/oggcore_1/bin/adminsrvr --config /gg_data/ServiceManager/var/temp/dep_ctmsbob_ft2-adminsrvr-config.dat --force --quiet

oracle     48688       1  4 03:38 ?        00:00:00 /app/oracle/21.10/oggcore_1/bin/distsrvr --config /gg_data/ServiceManager/var/temp/dep_ctmsbob_ft2-distsrvr-config.dat --force --quiet

oracle     48690       1  5 03:38 ?        00:00:00 /app/oracle/21.10/oggcore_1/bin/pmsrvr --config /gg_data/ServiceManager/var/temp/dep_ctmsbob_ft2-pmsrvr-config.dat --force --quiet

oracle     48692       1  4 03:38 ?        00:00:00 /app/oracle/21.10/oggcore_1/bin/recvsrvr --config /gg_data/ServiceManager/var/temp/dep_ctmsbob_ft2-recvsrvr-config.dat --force --quiet

oracle     48839   47819  0 03:38 pts/0    00:00:00 grep --color=auto -i servicemanager

These processes must be terminated.  Simply stopping the ServiceManager will not stop the deployments.

 

To terminate active deployment processes, commands like kill can be used.

 

$ kill -9 `ps -ef | grep -i servicemanager | awk '{print $2}'`

-bash: kill: (56172) - No such process

[oracle@oggma01 bin]$ ps -ef | grep -i servicemanager

oracle     56175   55611  0 21:56 pts/0    00:00:00 grep --color=auto -i servicemanager

Step 4: Failover the NFS mount point to passive node

In this step, we will be unmounting and manually moving the NFS mount point from the active node to the passive node.  This is to simulate a failover between the nodes.

Step 4.1: Unmount /gg_data on Active Node

 

$ sudo su –

$ cd /

$ umount /gg_data

 

Step 4.2: Mount /gg_data on Passive Node

 

The NFS mount point and addressed used in this example will be different in other environments.

 

$ sudo su –

$ mount -v 10.0.0.145:/gg_data /gg_data

$ cd /gg_data

$ ls -ltra

total 2

dr-xr-xr-x. 19 root   root     267 Aug 21 21:28 ..

drwxrwxr-x.  4 oracle oinstall   2 Aug 21 21:47 .

drwxr-x---.  5 oracle oinstall   3 Aug 21 21:47 ServiceManager

drwxr-x---.  5 oracle oinstall   3 Aug 21 21:47 dep_ctmsbob_ft2

drwxrwxr-x.  2 oracle oinstall   0 Aug 21 22:01 .snapshot

 

Notice that the ServiceManager and the deployment are now on the Passive Node.  Once this process starts, the passive node will now become the Active Node.

 

Step 5: Start ServiceManager on Passive Node

On the passive node, we need to set the required environment variables for the ServiceManager.  These variables are OGG_ETC_HOME, OGG_VAR_HOME, and OGG_HOME.  These environment variables must be set before the Service Manager can start.

 

$ sudo su –

$ chown -R oracle. /gg_data/ServiceManager

$ sudo su – oracle

$ export OGG_ETC_HOME=/gg_data/ServiceManager/etc

$ export OGG_VAR_HOME=/gg_data/ServiceManager/var

$ export OGG_HOME=/app/oracle/21.10/oggcore_1

 

Once the environment variables have been set, we can then go to the bin directory within the ServiceManager deployment and start the ServiceManager.

 

$ cd /gg_data/ServiceManager/bin

$ ./startSM.sh

When the ServiceManager starts on the Passive Node, it will start and bring up the deployment processes.  By doing a grep, we can see these processes.

 

$ ps -ef | grep -i servicemanager

oracle     54703       1  3 22:13 ?        00:00:00 /app/oracle/21.10/oggcore_1/bin/ServiceManager --quiet

oracle     54721   54703  7 22:13 ?        00:00:00 /app/oracle/21.10/oggcore_1/bin/recvsrvr --config /gg_data/ServiceManager/var/temp/dep_ctmsbob_ft2-recvsrvr-config.dat --force --quiet

oracle     54723   54703  7 22:13 ?        00:00:00 /app/oracle/21.10/oggcore_1/bin/adminsrvr --config /gg_data/ServiceManager/var/temp/dep_ctmsbob_ft2-adminsrvr-config.dat --force --quiet

oracle     54725   54703  7 22:13 ?        00:00:00 /app/oracle/21.10/oggcore_1/bin/pmsrvr --config /gg_data/ServiceManager/var/temp/dep_ctmsbob_ft2-pmsrvr-config.dat --force --quiet

oracle     54727   54703  7 22:13 ?        00:00:00 /app/oracle/21.10/oggcore_1/bin/distsrvr --config /gg_data/ServiceManager/var/temp/dep_ctmsbob_ft2-distsrvr-config.dat --force --quiet

oracle     54865   54633  0 22:13 pts/0    00:00:00 grep --color=auto -i servicemanager

 

Conclusion:

Congratulations! You have successfully switched Oracle GoldenGate 21.10 Deployment from the active node to the passive node.

    • Related Articles

    • Installing Oracle GoldenGate deployments

      Installing Oracle GoldenGate deployments Author: Bobby Curtis, MBA Date: August 8, 2023 Organization: RheoData Table of Contents INTRODUCTION: Prerequisites: STEP 1: DOWNLOAD ORACLE GOLDENGATE 21.10 STEP 2: TRANSFER INSTALLATION FILES STEP 3: EXTRACT ...
    • Oracle GoldenGate - Backup Oracle GoldenGate Deployments

      Backup Oracle GoldenGate Deployments Author: Bobby Curtis, MBA Date: January 23, 2025 Updated: October 13, 2023 Organization: RheoData Table of Contents INTRODUCTION: Assumption: STEP 1: ACCESS THE ORACLE GOLDENGATE SERVER STEP 2: IDENTIFY THE ...
    • Oracle GoldenGate - Installing Oracle GoldenGate binaries

      Installing Oracle GoldenGate binaries Author: Bobby Curtis, MBA Date: August 4, 2023 Organization: RheoData Table of Contents INTRODUCTION: Prerequisites: STEP 1: DOWNLOAD ORACLE GOLDENGATE 21.10 STEP 2: TRANSFER INSTALLATION FILES STEP 3: EXTRACT ...
    • Oracle GoldenGate - Out-of-Place Patching

      Oracle GoldenGate Out-of-Place Patching Author: Bobby Curtis, MBA Date: October 17, 2023 Updated: January 23, 2025 Organization: RheoData Table of Contents INTRODUCTION: PLATFORM PATCHING SECOND HOME PATCHSET LIST DEPLOYMENTS PATCH SERVICEMANAGER VIA ...
    • Oracle GoldenGate - Exception Handling

      Oracle GoldenGate Exception Handling Author: Bobby Curtis, MBA Date: October 3, 2023 Updated: January 23, 2025 Organization: RheoData Table of Contents INTRODUCTION: EXCEPTION TABLE(S) INFO Exception Table Exception Macro Update Replicat CONCLUSION: ...