Pages

Wednesday, May 24, 2023

How to apply patch on Oracle Golden Gate by Example

How to apply Oracle Golden Gate patch by Example
Need apply latest patch for Oracle Golden Gate.

==================
Theory
==================

Which documents to check:



Per Primary Note for Oracle GoldenGate Core Product Patch Sets (Doc ID 1645495.1)
Latest patch is:
Patch 35326271: Oracle GoldenGate 19.1.0.0.230422 for Oracle 12c - Upgrades GG to 19.1.0.0.230422
   Oracle GoldenGate 19.1.0.0.230418/19.1.0.0.230422 Patch Set Availability (Doc ID 2947665.1)
   09-MAY-2023
 
==================
Backup
==================

--------------------------
--Backup $GG_HOME/OPatch
--------------------------
mkdir /run/gg_patches_backup/GG_OPatch
cp -rp /software/ogg/191/OPatch/* /run/gg_patches_backup/GG_OPatch/

--------------------------
--Backup $GG_HOME/
--------------------------
mkdir /run/gg_patches_backup/GG_HOME
cp -rp /software/ogg/191/ /run/gg_patches_backup/GG_HOME/


==================
Check and sync drdb
==================
In case server is replicated with drdb, check step 2, else go to step 3
as root
drbdadm status
in case output it A - perform drdb sync
~>% drbdadm status
A
Ora_Exp role:Primary
  disk:UpToDate
  qanfv-1-dbs-1a connection:StandAlone

in case output it B - Continue to next step
Ora_Exp role:Primary
  disk:UpToDate
  qanfv-1-dbs-1a role:Secondary
    peer-disk:UpToDate

or

Ora_Exp role:Secondary
  disk:UpToDate
  qanfv-1-dbs-1b role:Primary
    peer-disk:UpToDate


secondary => drbdadm secondary ogg
secondary => drbdadm disconnect ogg
secondary => drbdadm -- --discard-my-data connect ogg
primary =>   drbdadm connect ogg
secondary => drbdadm status
primary =>   drbdadm status

  
==================
Apply OPatch p6880880_121010_Linux-x86-64.zip
==================
Because of compatability issues, need to upgrade Golden Gate opath to latest version.

cd /software/ogg/191/OPatch
mkdir OPatch_12.2.0.1.17
mv * OPatch_12.2.0.1.17/
cp /software/oracle/oracle/patches/p6880880_121010_Linux-x86-64.zip /software/ogg/191/OPatch
unzip p6880880_121010_Linux-x86-64.zip
mv -f OPatch/* .
rm -r OPatch
rm p6880880_121010_Linux-x86-64.zip

--test: 
./opatch version
expected result: OPatch Version: 12.2.0.1.37
--list existing patches
./opatch lsinventory
./opatch lspatches

===========================
Apply Patch
===========================
Follow Oracle document
https://docs.oracle.com/en/middleware/goldengate/core/19.1/installing/install-installing-patches-classic-architecture.html

In this Example: Release 19c (19.0.0.230418) - April 2023
p35326271_19100230422_Linux-x86-64.zip - 

NOTE - Oracle Golden Gate has it own jdk, OPatch, *.so files, etc. 
       So path should be done there.
       - GoldenGate_Installation_Path = /software/ogg/191

cd patch_top_dir
unzip patch_number_version_platform.zip
cd patch_top_dir/patch_number_dir
  
export ORACLE_HOME=/software/ogg/191
PATH=$PATH:$ORACLE_HOME/OPatch

Check current inventory
opatch lsinventory

Check compatability
opatch prereq CheckConflictAgainstOHWithDetail -ph ./
---------------
oracle@server:~/patches/35326271/35326271>% opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 12.2.0.1.37
Copyright (c) 2023, Oracle Corporation.  All rights reserved.
PREREQ session
Oracle Home       : /software/ogg/191
Central Inventory : /software/ogg/installers
   from           : /software/ogg/191/oraInst.loc
OPatch version    : 12.2.0.1.37
OUI version       : 12.2.0.4.0
Log file location : /software/ogg/191/cfgtoollogs/opatch/opatch2023-05-24_07-50-24AM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
---------------

===========================
Stop GG processes Before patching Oracle GoldenGate
===========================
cd /software/ogg/191
./ggsci
STOP *
STOP MGR!
INFO ALL
All should be stopped
EXIT

Apply patch to Oracle GoldenGate, 
opatch apply
----------------------
oracle@server:~/patches/35326271/35326271>% opatch apply
Oracle Interim Patch Installer version 12.2.0.1.37
Copyright (c) 2023, Oracle Corporation.  All rights reserved.

Oracle Home       : /software/ogg/191
Central Inventory : /software/ogg/installers
   from           : /software/ogg/191/oraInst.loc
OPatch version    : 12.2.0.1.37
OUI version       : 12.2.0.4.0
Log file location : /software/ogg/191/cfgtoollogs/opatch/opatch2023-05-24_07-52-52AM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   35326271

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 = '/software/ogg/191')

Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '35326271' to OH '/software/ogg/191'

Patching component oracle.oggcore.ora12c, 19.1.0.0.0...
Patch 35326271 successfully applied.
Log file location: /software/ogg/191/cfgtoollogs/opatch/opatch2023-05-24_07-52-52AM_1.log

OPatch succeeded.
----------------------

Check inventory
opatch lsinventory
----------------------
oracle@server:~/patches/35326271/35326271>% opatch lsinventory
Oracle Interim Patch Installer version 12.2.0.1.37
Copyright (c) 2023, Oracle Corporation.  All rights reserved.

Oracle Home       : /software/ogg/191
Central Inventory : /software/ogg/installers
   from           : /software/ogg/191/oraInst.loc
OPatch version    : 12.2.0.1.37
OUI version       : 12.2.0.4.0
Log file location : /software/ogg/191/cfgtoollogs/opatch/opatch2023-05-24_07-54-44AM_1.log
Lsinventory Output file location : /software/ogg/191/cfgtoollogs/opatch/lsinv/lsinventory2023-05-24_07-54-44AM.txt
---------------------------------------------------------------------
Local Machine Information::
Hostname: server
ARU platform id: 226
ARU platform description:: Linux x86-64

Installed Top-level Products (1):
Oracle GoldenGate Core                                              19.1.0.0.0
There are 1 products installed in this Oracle Home.

Interim patches (1) :
Patch  35326271     : applied on Wed May 24 07:53:57 GMT 2023
Unique Patch ID:  25225415
Created on 28 Apr 2023, 00:46:05 hrs PST8PDT
Bugs fixed:
16564626, 16814471, 18294101, 20513471, 24611231, 25475406, 26078270
26752745, 26812342, 27313577, 27844596, 28045394, 28480385, 28725556
28796786, 29156819, 29166143, 29209870, 29225584, 29227058, 29271448
29299615, 29314744, 29346116, 29358314, 29376018, 29400201, 29488053
29500119, 29557298, 29585511, 29706933, 29717473, 29742654, 29744500
29751899, 29768950, 29774881, 29805211, 29809446, 29814575, 29856640
29869207, 29902799, 29909549, 29910461, 29915014, 29916615, 29920698
29926335, 30006961, 30017628, 30024507, 30030081, 30030259, 30032166
30033430, 30033958, 30043836, 30048129, 30076679, 30080233, 30102653
30102893, 30150540, 30162025, 30207560, 30233950, 30246124, 30265723
30267467, 30275490, 30283060, 30286459, 30301634, 30310568, 30310604
30321894, 30333176, 30340476, 30342450, 30342778, 30358775, 30372831
30404307, 30404574, 30427030, 30441555, 30446367, 30446832, 30453041
30453885, 30458313, 30468226, 30473280, 30473302, 30473323, 30475749
30484169, 30484525, 30485152, 30493260, 30494573, 30494613, 30494732
30494822, 30503529, 30507570, 30511946, 30517837, 30523539, 30534012
30539518, 30540184, 30548038, 30572581, 30577266, 30579002, 30582001
30585160, 30585161, 30587460, 30594864, 30598252, 30600424, 30600473
30601512, 30601520, 30609604, 30612519, 30614202, 30618355, 30622854
30622974, 30623521, 30633479, 30634544, 30634903, 30635206, 30637766
30638977, 30640908, 30641360, 30650848, 30651192, 30651405, 30651501
30651691, 30657209, 30662222, 30663342, 30663522, 30665877, 30669929
30680081, 30680258, 30680613, 30680756, 30680818, 30681006, 30682568
30685842, 30686209, 30688349, 30693366, 30693987, 30696013, 30700666
30703607, 30713018, 30717771, 30719522, 30719897, 30722842, 30724310
30729495, 30729766, 30731018, 30734990, 30737450, 30738970, 30739999
30753086, 30763551, 30778094, 30782649, 30786365, 30791492, 30796546
30797198, 30797378, 30806586, 30811831, 30812800, 30815503, 30818230
30818690, 30818727, 30823108, 30823432, 30826774, 30827735, 30827972
30832255, 30838154, 30838254, 30845653, 30846419, 30846594, 30851346
30856970, 30861257, 30861743, 30864484, 30865197, 30865462, 30871350
30873300, 30875325, 30877853, 30880051, 30881232, 30881572, 30883131
30884891, 30889577, 30890481, 30892202, 30896679, 30897196, 30897713
30902327, 30903305, 30903771, 30905623, 30905753, 30905759, 30906693
30911601, 30911868, 30913807, 30917522, 30920035, 30926412, 30932343
30938120, 30944394, 30945407, 30947828, 30950624, 30952137, 30955351
30955775, 30962699, 30964666, 30966524, 30966604, 30966810, 30972344
30973756, 30973776, 30975972, 30979167, 30987480, 30988993, 30990451
30990596, 30993340, 30994687, 30995568, 31000610, 31003735, 31010508
31013450, 31015014, 31027089, 31027128, 31027137, 31039410, 31040380
31040907, 31045117, 31056957, 31062378, 31066223, 31071409, 31071657
31072446, 31091288, 31097457, 31098304, 31099592, 31107854, 31113468
31114345, 31118592, 31122004, 31123944, 31129752, 31131773, 31139595
31139615, 31142667, 31143243, 31157419, 31158148, 31165352, 31168595
31170155, 31172278, 31175237, 31175404, 31175842, 31176144, 31177621
31178248, 31188252, 31189911, 31190369, 31192285, 31198252, 31198464
31202227, 31206379, 31208291, 31208886, 31209070, 31213929, 31215503
31219406, 31222222, 31225570, 31226166, 31227988, 31228480, 31232100
31240314, 31256737, 31271859, 31278701, 31303118, 31305105, 31311503
31316835, 31318412, 31319298, 31323568, 31323909, 31323928, 31326414
31326425, 31329767, 31336850, 31346319, 31346587, 31349966, 31350053
31350725, 31367261, 31367923, 31373499, 31373504, 31374076, 31381472
31381479, 31386231, 31401692, 31410995, 31418833, 31425169, 31425300
31427347, 31431124, 31433207, 31440697, 31441320, 31441364, 31445469
31449007, 31451676, 31454801, 31456379, 31456620, 31458308, 31460112
31461836, 31476229, 31480365, 31482479, 31484993, 31487146, 31497291
31507116, 31507433, 31507455, 31507736, 31516459, 31517762, 31518720
31521735, 31526548, 31528537, 31536652, 31541257, 31547747, 31548760
31551177, 31556722, 31560266, 31561650, 31561710, 31563090, 31568477
31575532, 31578150, 31581443, 31581999, 31582715, 31587315, 31587607
31591273, 31596246, 31596830, 31601424, 31601988, 31606188, 31606636
31607165, 31607315, 31607593, 31616216, 31625576, 31626902, 31627080
31627129, 31637694, 31644179, 31645696, 31647619, 31650786, 31653611
31656230, 31659809, 31668277, 31669209, 31680465, 31682817, 31689380
31695862, 31703323, 31704543, 31709315, 31709430, 31711659, 31729354
31730873, 31734485, 31738301, 31738375, 31745011, 31758036, 31760611
---------------------------------------------------------------------
OPatch succeeded.
----------------------
===========================
Start GG processes After patching Oracle GoldenGate
===========================
./ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 19.1.0.0.230422 

cd /software/ogg/191
./ggsci
START MGR
START *
INFO ALL

No comments:

Post a Comment