How to apply GoldenGate 23ai Patch

Keeping your application updated is crucial for several reasons. With each new update, you can access the latest features, security patches, and performance improvements that enhance the overall efficiency and safety of your application.

Here I will show how to move from 23.4 to 23.6 but the procedure applies to other versions too.

Opatch

To apply patches to Oracle products, you need the Opatch utility. For detailed instructions, refer to Doc ID 274526.1 or search for patch number 6880880 in My Oracle Support (MOS).

If you attempt to use an outdated Opatch version, you may encounter the following error:

The OPatch being used is version 12.2.0.1.41 while the following patch(es) require higher versions:
Patch XXXXXX requires OPatch version 12.2.0.1.43 or later.
Please download the latest OPatch from My Oracle Support.

To resolve this issue, download the latest Opatch from My Oracle Support. Once downloaded, replace the existing Opatch with the new version by following these steps:

cd /u01/oggHome/
mv OPatch OPatch_old
cp -r /path/to/downloaded_opatch/ .

Change /u01/oggHome to your Home.

Download GoldenGate Patch files

To find and download GoldenGate patch files, navigate to the “Patches & Updates” section in My Oracle Support. You can build a query to search specifically for GoldenGate patches, this ensures you have the most up-to-date fixes and enhancements for your GoldenGate deployment.

Keeping everything updated not only helps you take advantage of the latest features and improvements but also ensures that your systems are secure and running smoothly. Remember to always stay on top of updates and patches for a seamless and safe operational experience.

*Change the Release with the version that you want to go

You have two options when looking for GoldenGate, Patch and Complete Install:

In my case, I will apply the patch only. If you have multiple deployments/technologies, it’s important to verify your service manager technology. To do this, navigate to the /SERVICE_MANAGER_PATH/var/log directory and check the ServiceManager.log for the startup message. In my scenario, the log indicates: Oracle GoldenGate Service Manager for Oracle (main), that should be the patch to apply in your ServiceManager.

Stop process.

First, stop all extract, replicat, distribution, and receive services from your deployments. After that, stop the deployment itself. You can connect to the Service Manager and run the command stop deployment * to halt all deployments.

And stop the Service manager, in my case its registered as a service in my linux machine:

systemctl stop OracleGoldenGate

Next, you can verify if there are any running processes before applying the patch with the following command:

ps -ef | grep -Ei ‘extract|replicat|pmsrvr|distsrvr|adminsrvr’

If any processes are returned, it means you are not ready to apply the patch.

Then, extract the patch files and navigate to the extracted directory, export your homes for each deployment:

export OGG_VAR_HOME=/u01/ogg/Oracle/var
export OGG_ETC_HOME=/u01/ogg/Oracle/etc

First, check for conflicts:

cd /media/sf_Downloads/p37071328_23602410OGGRU_Linux-x86-64/37071328
[oracle@OL94VD23OGG23 37071328]$ /u01/oggHome/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./

Your output should look like:

Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.

If there are no conflicts, you can apply the patch with:

/u01/oggHome/OPatch/opatch apply

Repeat this procedure for each deployment and start the deployments after it, for service manager you can run:

systemctl start OracleGoldenGate

And if you have a problem?

If you have any running process, the apply will fail, maybe with a similar error:

/u01/oggHomePSQL/OPatch/opatch apply
Oracle Interim Patch Installer version 12.2.0.1.44
Copyright (c) 2024, Oracle Corporation.  All rights reserved.

Oracle Home       : /u01/oggHomePSQL

Central Inventory : /u01/app/oraInventory

   from           : /u01/oggHomePSQL/oraInst.loc

OPatch version    : 12.2.0.1.44

OUI version       : 12.2.0.9.0

Log file location : /u01/oggHomePSQL/cfgtoollogs/opatch/opatch2024-11-05_18-22-42PM_1.log

Verifying environment and performing prerequisite checks...
Launch OOP...

Oracle Interim Patch Installer version 12.2.0.1.44

Copyright (c) 2024, Oracle Corporation.  All rights reserved.

Oracle Home       : /u01/oggHomePSQL

Central Inventory : /u01/app/oraInventory

   from           : /u01/oggHomePSQL/oraInst.loc

OPatch version    : 12.2.0.1.44

OUI version       : 12.2.0.9.0

Log file location : /u01/oggHomePSQL/cfgtoollogs/opatch/opatch2024-11-05_18-23-04PM_1.log

Verifying environment and performing prerequisite checks...

OPatch continues with these patches:   37071328 

Do you want to proceed? [y|n]

y

User Responded with: Y

All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.

(Oracle Home = '/u01/oggHomePSQL')

Is the local system ready for patching? [y|n]

y

User Responded with: Y

Backing up files...

Applying interim patch '37071328' to OH '/u01/oggHomePSQL'

Patching component oracle.oggcore.PostgreSQL.services, 23.4.0.0.0...

Copy failed from '/media/sf_Downloads/p37071328_23602410OGGRU_Linux-x86-64/37071328/files/bin/replicat' to '/u01/oggHomePSQL/bin/replicat'... 

Please verify all applications associated with the Oracle Home '/u01/oggHomePSQL' are shut down. If this is AIX, please perform solution documented in Note 739963.1 on https://myoraclesupport.oracle.com.

Do you want to retry copying the file? [y|n]

y

User Responded with: Y

Retry copying the file to '/u01/oggHomePSQL/bin/replicat'.

The following actions have failed:

Copy failed from '/media/sf_Downloads/p37071328_23602410OGGRU_Linux-x86-64/37071328/files/bin/replicat' to '/u01/oggHomePSQL/bin/replicat'...

Do you want to proceed? [y|n]

n

User Responded with: N

ApplySession failed in system modification phase... 'ApplySession::apply failed: Copy failed from '/media/sf_Downloads/p37071328_23602410OGGRU_Linux-x86-64/37071328/files/bin/replicat' to '/u01/oggHomePSQL/bin/replicat'...

'

Restoring "/u01/oggHomePSQL" to the state prior to running NApply...

NApply was not able to restore the home.  Please invoke the following scripts:

  - restore.[sh,bat]

  - make.txt (Unix only)

to restore the ORACLE_HOME.  They are located under

"/u01/oggHomePSQL/.patch_storage/NApply/2024-11-05_18-23-04PM"

So its important to have an backup of your directories before running the apply or you can run the rollback scripts under the provided directory (/u01/oggHomePSQL/.patch_storage/NApply/2024-11-05_18-23-04PM in my case), export the ORACLE_HOME to your deployment home and run ./restore

But note this message:

./restore.sh

This script is going to restore the Oracle Home to the previous state.
It does not perform any of the following:

- Running init/pre/post scripts

- Oracle binary re-link

- Customized steps performed manually by user

Please use this script with supervision from Oracle Technical Support.

About to modify Oracle Home( /u01/oggHomePSQL/ )

Do you want to proceed? [Y/N]

y Y

User responded with : Y

./restore.sh: line 48: cd: /u01/oggHomePSQL/inventory/oneoffs: No such file or directory

./restore.sh: line 53: cd: /u01/oggHomePSQL/inventory/patches: No such file or directory

copy bin

datadirect

include

inventory

jdk

jlib

lib

src to /u01/oggHomePSQL/

Applying patches is a critical step in maintaining the security, performance, and reliability of your systems. By following the outlined process—stopping services, checking for conflicts, and applying the patch—you ensure that your deployment is up-to-date and running smoothly. Always remember to verify each step to avoid potential issues and make the most of the enhancements and fixes provided by the patches. Staying proactive with updates helps in safeguarding your infrastructure and leveraging the latest features and improvements. Happy patching!

chevron_left