合 如何在安装grid之前打补丁(PSU、RU)How to Apply a Grid Infrastructure Patch Before Grid Infrastructure Configuration (before root.sh or rootupgrade.sh or gridsetup.bat) is Executed (Doc ID 1410202.1)
Tags: Oracle打补丁PSURUroot.shgridSetup.sh
APPLIES TO:
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Oracle Database Cloud Service - Version N/A and later
Oracle Database - Enterprise Edition - Version 11.2.0.1 and later
Information in this document applies to any platform.
PURPOSE
It may be necessary to apply a patch prior to the execution of the root script to ensure successful root script execution (e.g. Document:1212703.1 ). This note describe the procedure to apply a Grid Infrastructure patch(including GI PSU patch) before GI is configured (in other word, before root.sh or rootupgrade.sh is executed).
In upgrade case, the note applies when a patch is being applied to the new GI home, it does not apply when applying to the existing (current) clusterware home.
Prior to executing the root script, applying a GI patch with the patch readme may result in failure as these instruction are written for a "configured" GI Home.
"opatch auto" must NOT be used as the new GI home hasn't been configured yet.
QUESTIONS AND ANSWERS
18.1 and above
Unzip Grid Infrastructure Gold Image to the Desired GI Home Location on the Local Node as the Grid user
Download and Install the latest OPatch Version (Patch 6880880) to the extracted GI Gold Image as the Grid user:
Note: Choose Overwrite ALL when prompted, do NOT remove the old OPatch directory from the GI_HOME prior to extracting
$ unzip -d $GIHOME p6880880
- Install/Upgrade the 18c GI and apply the patch to the Gold Image at the same time by running the following as the Grid user:
To apply only Release Updates:
$GI_HOME/gridSetup.sh -silent -applyRU
To apply only Non-RU patches:
$GI_HOME/gridSetup.sh -silent -applyRUR
To apply Release Updates and Non-RU patches in one command:
$GI_HOME/gridSetup.sh -silent -applyRU
For Windows, applyRU option is not supported. Install/configure the base Goldimage Software first (without -applyRU), and then install the RU using standard opatch/opatchauto process.
Note: If -silent option use, also specify -responseFile option and specify response file to avoid "[FATAL] [INS-40426] Grid installation option has not been specified." error.
An example is:
$ ./gridSetup.sh -applyRU /u01/patch/27100009/
Preparing the home to patch...
Applying the patch /u01/patch/27100009/...
Successfully applied the patch.
- Install with normal flow of gridSetup.sh. At the end of the installation OPatch should show the patch installed:
(If 'opatch lspatches' fail with below error, Check that gridSetup.sh has been run, then try again)
Inventory load failed... LsPatchesSession::loadAndPrintInstalledPatch()
LsPatchesSession failed: RawInventory gets null OracleHomeInfo
OPatch failed with error code 2
NOTE: In 18c you cannot apply the patch with opatchauto or 'gridSetup.sh -applyRU
12.2.0.1
The steps for 12.2.0.1 are:
Unzip Grid Infrastructure Gold Image to the Desired GI Home Location on the Local Node as the Grid user
Download and Install the latest OPatch Version (Patch 6880880) to the extracted GI Gold Image as the Grid user:
Note: Choose Overwrite ALL when prompted, do NOT remove the old OPatch directory from the GI_HOME prior to extracting
$ unzip -d $GIHOME p6880880
- Apply the patch to the Gold Image by running the following as the Grid user:
To apply only Release Updates:
$GI_HOME/gridSetup.sh -applyPSU
To apply only Non-RU patches:
$GI_HOME/gridSetup.sh -applyOneOffs
To apply Release Updates and Non-RU patches in one command:
$GI_HOME/gridSetup.sh -applyPSU