Step 3 – Patching in the Deep.
Oracle Fleet Patching and Provisioning – Grid Infrastructure
I will patch all my database servers grid infrastructure from 19.16 to 19.20. As there are more than 20 servers to patch, we will use fleet patching. First i have patched a 2 node cluster grid infrastructure by using out of place ( OOP ) patching methodology through gridSetup.sh in silent mode in Step 1 – Patch Me If You Can (Grid OOP Patching)
Now i will use patched grid homes to create a gold image for fleet patching of all grid homes.
Some useful references :
- Primay Note for Database Patching Using Enterprise Manager 13c Cloud Control Fleet Maintenance (Doc Id 2435251.1)
- Prerequisite Checks For Setting Up Fleet Environment (Doc ID 2434264.1)
- Enterprise Manager Fleet Maintenance FAQ (Doc ID 2272569.1)
- How to Patch Or Upgrade Grid Infrastructure Using Fleet Maintenance (Doc ID 2436830.1)
First create a location on Software Library in EMCC. We will use it as a destination for storing gold image.
Provisioning and Patching > Sofware Library
- Name : Gold Image Profiles
- Description : Gold Image Profiles for Database and Grid Infrastructure
- Name : 19c
- Description : Version 19c Images
We will create a response file, but at first we need the manual oop(out of place) patched grid home (target name) to refer in response file.
| [oracle@oravt01 ~]$ /u01/app/oracle/em_agent/GoldImage_GI135v6/agent_13.5.0.0.0/bin/emctl config agent listtargets | grep oracle_home | |
| [OraGI19Home1_1_oravt01.bjk_3271, oracle_home] | |
| [OraDB19Home1_2_oravt01.bjk_6741, oracle_home] | |
| [OraHome2_4_oravt01.kkk.bjk_2369, oracle_home] | |
| [OraGI19Home2_5_oravt01.bjk_1255, oracle_home] –> OOP Patched new grid home to create gold image | |
| [OraDB19Home2_6_oravt01.bjk_5493, oracle_home] –> OOP Patched new database home to create gold image |
Here is the content of the response file.
| IMAGE_NAME=19.20GRID | |
| IMAGE_DESCRIPTION=19.20 Grid Infrastructure Image | |
| REF_TARGET_NAME=OraGI19Home2_5_oravt01.bjk_1255 | |
| IMAGE_SWLIB_LOC=Gold Image Profiles/19c | |
| STORAGE_TYPE_FOR_SWLIB=OmsShared | |
| STORAGE_NAME_FOR_SWLIB=Software Location on ORAREPO | |
| REF_GI_CREDENTIALS=ORACLE@ORAVT01-02:SYSMAN | |
| WORKING_DIRECTORY=/tmp | |
| VERSION_NAME=19.20GRID |
It is time to create grid gold image.
| [oracle@oracc oms]$ /u01/app/oracle/em135/oms/bin/emcli login -username=SYSMAN | |
| [oracle@oracc Setup]$ /u01/app/oracle/em135/oms/bin/emcli db_software_maintenance -createSoftwareImage \ | |
| -input_file="data:/u01/app/Setup/grid_create_gold_image.rsp" | |
| [oracle@oracc Setup]$ emcli db_software_maintenance -getImages | |
| ================================================================================================================================================================ | |
| IMAGE ID IMAGE NAME DESCRIPTION VERSION IMAGE TYPE CREATION DATE OWNER | |
| ================================================================================================================================================================ | |
| 05161B2BF0C08F94E063CF14285FC25B 19.20GRID 19.20 Grid Infrastructure Image 19.0.0.0.0 Software Library 2023-09-11 16:16:32.0 SYSMAN | |
| —————————————————————————————————————————————————————- | |
| Total Rows: 1 |
Now we will subscribe to this gold image for oracluster2. (This is the cluster we want to patch with fleet maintenance)(This step can also be done from GUI/BUI, EMCC 13.5 RU16).
| [oracle@s001oracc Setup]$ /u01/app/oracle/em135/oms/bin/emcli db_software_maintenance -subscribeTarget -target_name=oracluster2 \ | |
| -target_type=cluster -image_id=05161B2BF0C08F94E063CF14285FC25B |
We will deploy gold image to target cluster. (This step can also be done from GUI/BUI, EMCC 13.5).
| [oracle@oracc Setup]$ vi /u01/app/Setup/grid_deploy_gold_image.txt | |
| NEW_ORACLE_HOME_LIST=/u01/app/19.20/grid | |
| workingDir=/tmp | |
| SKIP_PREREQUISITE_CHECKS=true | |
| SKIP_CVU_CHECK=true | |
| [oracle@oracc Setup]$ /u01/app/oracle/em135/oms/bin/emcli db_software_maintenance -performOperation -name=GRID_DEPLOY_oracluster2 \ | |
| -purpose=DEPLOY_GI_SOFTWARE -target_list=oracluster2 -target_type=cluster -normal_credential=ORACLE@ORAVT03-04:SYSMAN \ | |
| -privilege_credential=ROOT@ORAVT03-04:SYSMAN -input_file="data:/u01/app/Setup/grid_deploy_gold_image.txt" |
We have skipped CVU (Cluster Verification Utility) checks, otherwise it is detecting the processes running from current old/grid homes. Also if you encounter an error like “Reason: Error retrieving input stream for file entry ‘setup_stageArea_RACP.pl’”. Just reimport sofware library metadata with the command: emcli reimport_swlib_metadata.
It is time to switch to new grid home in rolling manner. With the below command, cluster will be updated to gold image version and the Grid Infrastructure targets running from old Oracle grid home will be migrated to NEWLY Patched Oracle grid home node by node with no downtime.
| [oracle@oracc agent_13.5.0.0.0]$ /u01/app/oracle/em135/oms/bin/emcli db_software_maintenance -performOperation \ | |
| -name=GRID_UPDATE_oracluster2 -purpose=UPDATE_GI -target_list=oracluster2 -target_type=cluster \ | |
| -normal_credential=ORACLE@ORAVT03-04:SYSMAN -privilege_credential=ROOT@ORAVT03-04:SYSMAN -rolling=true |
All grid/cluster patching has been completed as easy as taking candy from a baby. Listener.ora and glogin.sql files are copied to new grid home. We will just update all our shell scripts, .bashrc etc files to refer new grid home. Also after patching completed, in EMCC – under Add targets menu, rediscover your updated hosts and promote newly discovered targets associated with the new grid home.
Hope it helps.
See you on Step 4 – How to Patch Database Using Fleet Patching


Leave your comment