記錄下 patch Grid Infrastructure for Standalone
以下內容根據今天下午給GI standalone打補丁記錄整理而成,參考對應的 readme 檔案
##
## latest patch p18706472_112040_Linux-x86-64.zip
## OS RedHat 6.4 64
## DB 11.2.0.4.0 Single instance owner user oracle
## ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_home
## GI 11.2.0.4.0 GI for standalone owner user grid
## ORACLE_HOME:/u01/app/grid/product/11.2.0/grid/
##
## target:
## install the latest patch p18706472_112040_Linux-x86-64 to the db and GI
## as detailed in readme, this file p18706472_112040_Linux-x86-64 include both patch for GI and DB
##
##
2.1.1 opatch tool
要安裝補丁p18706472_112040_Linux-x86-64.zip的話,需要先給opatch這個工具升級,或者是給它打補丁
在oracle和grid使用者下 重複執行 2.1.1.a and 2.1.1.b 的命令
2.1.1.a 確認opatch 的版本:
cd $ORACLE_HOME/OPatch
$[oracle@rhel ~]$./opatch version
or
[oracle@rhel ~]$ export PATH=$ORACLE_HOME/OPatch:$PATH
[oracle@rhel ~]$ opatch version
OPatch Version: 11.2.0.3.6
OPatch succeeded.
You must use the OPatch utility version 11.2.0.3.6 or later to apply this patch.
保證opatch的版本高於readme中要求的版本,GI PSU 11.2.0.4.3 的readme.txt中要求的opatch版本為最低11.2.0.6.0,否則的話,
請下載最新的opatch:
2.1.1.b 更新opatch tool
先備份原有的opatch
tar -cvf opatchbackup.tar ./OPatch
更新 opatch tool
unzip p6880880_112000_linux.zip -d $ORACLE_HOME
2.1.2 配置OCM
切換到 grid user
cd $ORACLE_HOME/OPatch/ocm/bin/
[grid@rhel bin]$ ./emocmrsp
emocmrsp
OCM Installation Response Generator 10.3.4.0.0 - Production
Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: Y
The OCM configuration response file (ocm.rsp) was successfully created.
It will be created in $ORACLE_HOME/OPatch/ocm/bin/ocm.rsp
2.1.3 下載並解壓GI PSU 11.2.0.4.3:
用grid 使用者將檔案上傳到伺服器並且解壓, 必須用grid使用者解壓。
$ cd /home/grid/
$ unzip p18706472_112040_Linux-x86-64.zip
########注意:開始在操作的時候解壓到grid使用者的home目錄,在執行補丁安裝的時候出錯了,
##補丁包含了DB和GI的補丁,root執行patch auto後 會切換到 oracle 和 grid使用者下分別執行一些任務,因此補丁解壓後的目錄
##使用者 oracle & grid 應該都有wrx許可權. 在第二次操作的時候將解壓目錄移動到 /tmp/下去了
##
## 第一次執行 失敗
root@rhel:patch auto /home/grid/18706472 -ocmrf /u01/app/grid/product/11.2.0/grid/OPatch/ocm/bin/ocm.rsp
在執行日誌中發現了以下內容
2014-07-16 02:18:31: s_run_as_user2: Running /bin/su oracle -c ' /u01/app/oracle/product/11.2.0/db_home/OPatch/opatch util checkMinimumOPatchV
ersion -ph /home/grid/18706472/18522509 -version 11.2.0.3.6 -oh /u01/app/oracle/product/11.2.0/db_home '
2014-07-16 02:18:32: Removing file /tmp/filepe8Glm
2014-07-16 02:18:32: Successfully removed file: /tmp/filepe8Glm
2014-07-16 02:18:32: /bin/su exited with rc=135
2014-07-16 02:18:32: The opatch minimum version check for patch /home/grid/18706472/18522509 failed for /u01/app/oracle/product/11.2.0/db_ho
me
2014-07-16 02:18:32: The opatch version check failed with following error
2014-07-16 02:18:32: Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation. All rights reserved.
ZOP-50: The patch location is not valid because it may be not exist or current user has no permission to access it.
Argument(s) Error... Patch Location not valid
Please check the arguments and try again.
## 將解壓檔案轉移到grid oracle都有 wrx 許可權的目錄下
[root@rhel grid]# mv /home/grid/18706472/ /tmp/
2.1.4 停止em agent
在oracle使用者下執行
命令 emctl status dbconsole 檢視是否在執行
執行命令 停止em:emctl stop dbconsole
2.2 檢查補丁衝突
grid使用者:
$ cd /tmp/18706472
$ ./$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/grid/product/11.2.0/grid
Central Inventory : /u01/app/oraInventory
from : /u01/app/grid/product/11.2.0/grid/oraInst.loc
OPatch version : 11.2.0.3.6
OUI version : 11.2.0.4.0
Log file location : /u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatch/opatch2014-07-16_02-04-49AM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
2.3 補丁安裝
實際環境:oracle single instance database and GI for standalone
根據readme中的資訊, 用root身份執行相關命令安裝補丁(無需停止GI),執行了命令後,會自動停止GI和所有資源;
然後在GI和DB的ORACLE_HOME下都安裝GI 和DB的PSU;
最後會GI和資源都啟動。
# opatch auto -ocmrf
opatch auto /home/grid/18706472 -ocmrf /u01/app/grid/product/11.2.0/grid/OPatch/ocm/bin/ocm.rsp ##出錯
Executing /u01/app/grid/product/11.2.0/grid/perl/bin/perl /u01/app/grid/product/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /home/grid -patchn 18706472 -ocmrf /u01/app/grid/product/11.2.0/grid/OPatch/ocm/bin/ocm.rsp -paramfile /u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params
This is the main log file: /u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto2014-07-16_02-18-19.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto2014-07-16_02-18-19.report.log
2014-07-16 02:18:19: Starting Oracle Restart Patch Setup
Using configuration parameter file: /u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params
The opatch minimum version check for patch /home/grid/18706472/18522509 failed for /u01/app/oracle/product/11.2.0/db_home
The opatch minimum version check for patch /home/grid/18706472/18522515/custom/server/18522515 failed for /u01/app/oracle/product/11.2.0/db_home
Opatch version check failed for oracle home /u01/app/oracle/product/11.2.0/db_home
Opatch version check failed
ERROR: update the opatch version for the failed homes and retry
opatch auto failed.
#第二次執行 執行成功
opatch auto /tmp/18706472 -ocmrf /u01/app/grid/product/11.2.0/grid/OPatch/ocm/bin/ocm.rsp
Executing /u01/app/grid/product/11.2.0/grid/perl/bin/perl /u01/app/grid/product/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /tmp -patchn 18706472 -ocmrf /u01/app/grid/product/11.2.0/grid/OPatch/ocm/bin/ocm.rsp -paramfile /u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params
This is the main log file: /u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto2014-07-16_02-39-59.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto2014-07-16_02-39-59.report.log
2014-07-16 02:39:59: Starting Oracle Restart Patch Setup
Using configuration parameter file: /u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params
Stopping RAC /u01/app/oracle/product/11.2.0/db_home ...
Stopped RAC /u01/app/oracle/product/11.2.0/db_home successfully
patch /tmp/18706472/18522509 apply successful for home /u01/app/oracle/product/11.2.0/db_home
patch /tmp/18706472/18522515/custom/server/18522515 apply successful for home /u01/app/oracle/product/11.2.0/db_home
Stopping CRS...
Stopped CRS successfully
patch /tmp/18706472/18522509 apply successful for home /u01/app/grid/product/11.2.0/grid
patch /tmp/18706472/18522515 apply successful for home /u01/app/grid/product/11.2.0/grid
patch /tmp/18706472/18522514 apply successful for home /u01/app/grid/product/11.2.0/grid
Starting CRS...
CRS-4123: Oracle High Availability Services has been started.
Starting RAC /u01/app/oracle/product/11.2.0/db_home ...
Started RAC /u01/app/oracle/product/11.2.0/db_home successfully
opatch auto succeeded.
2.4 Patch Post-InstallationInstructions
2.4.1 用oracle使用者連線到資料庫上:
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
sys@ANDREW> select version, id, bundle_series, comments from dba_registry_history;
VERSION ID BUNDLE_SERIES COMMENTS
------------------------------ ---------- ------------------------------ ----------------------------------------
11.2.0.4 0 PSU Patchset 11.2.0.2.0
11.2.0.4 3 PSU PSU 11.2.0.4.3
2.4.3 如果您使用了RMAN,需要將RMAN catalog庫升級一下,執行:
$ rman catalog andrew/password@ANDREWDB
RMAN> UPGRADE CATALOG;
Recovery Manager: Release 11.2.0.4.0 - Production on Wed Jul 16 03:12:31 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to recovery catalog database
RMAN> upgrade catalog;
recovery catalog owner is RMAN
enter UPGRADE CATALOG command again to confirm catalog upgrade
RMAN> upgrade catalog;
recovery catalog upgraded to version 11.02.00.04
DBMS_RCVMAN package upgraded to version 11.02.00.04
DBMS_RCVCAT package upgraded to version 11.02.00.04
RMAN> exit
##
## latest patch p18706472_112040_Linux-x86-64.zip
## OS RedHat 6.4 64
## DB 11.2.0.4.0 Single instance owner user oracle
## ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_home
## GI 11.2.0.4.0 GI for standalone owner user grid
## ORACLE_HOME:/u01/app/grid/product/11.2.0/grid/
##
## target:
## install the latest patch p18706472_112040_Linux-x86-64 to the db and GI
## as detailed in readme, this file p18706472_112040_Linux-x86-64 include both patch for GI and DB
##
##
2.1.1 opatch tool
要安裝補丁p18706472_112040_Linux-x86-64.zip的話,需要先給opatch這個工具升級,或者是給它打補丁
在oracle和grid使用者下 重複執行 2.1.1.a and 2.1.1.b 的命令
2.1.1.a 確認opatch 的版本:
cd $ORACLE_HOME/OPatch
$[oracle@rhel ~]$./opatch version
or
[oracle@rhel ~]$ export PATH=$ORACLE_HOME/OPatch:$PATH
[oracle@rhel ~]$ opatch version
OPatch Version: 11.2.0.3.6
OPatch succeeded.
You must use the OPatch utility version 11.2.0.3.6 or later to apply this patch.
保證opatch的版本高於readme中要求的版本,GI PSU 11.2.0.4.3 的readme.txt中要求的opatch版本為最低11.2.0.6.0,否則的話,
請下載最新的opatch:
2.1.1.b 更新opatch tool
先備份原有的opatch
tar -cvf opatchbackup.tar ./OPatch
更新 opatch tool
unzip p6880880_112000_linux.zip -d $ORACLE_HOME
2.1.2 配置OCM
切換到 grid user
cd $ORACLE_HOME/OPatch/ocm/bin/
[grid@rhel bin]$ ./emocmrsp
emocmrsp
OCM Installation Response Generator 10.3.4.0.0 - Production
Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit for details.
Email address/User Name:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: Y
The OCM configuration response file (ocm.rsp) was successfully created.
It will be created in $ORACLE_HOME/OPatch/ocm/bin/ocm.rsp
2.1.3 下載並解壓GI PSU 11.2.0.4.3:
用grid 使用者將檔案上傳到伺服器並且解壓, 必須用grid使用者解壓。
$ cd /home/grid/
$ unzip p18706472_112040_Linux-x86-64.zip
########注意:開始在操作的時候解壓到grid使用者的home目錄,在執行補丁安裝的時候出錯了,
##補丁包含了DB和GI的補丁,root執行patch auto後 會切換到 oracle 和 grid使用者下分別執行一些任務,因此補丁解壓後的目錄
##使用者 oracle & grid 應該都有wrx許可權. 在第二次操作的時候將解壓目錄移動到 /tmp/下去了
##
## 第一次執行 失敗
root@rhel:patch auto /home/grid/18706472 -ocmrf /u01/app/grid/product/11.2.0/grid/OPatch/ocm/bin/ocm.rsp
在執行日誌中發現了以下內容
2014-07-16 02:18:31: s_run_as_user2: Running /bin/su oracle -c ' /u01/app/oracle/product/11.2.0/db_home/OPatch/opatch util checkMinimumOPatchV
ersion -ph /home/grid/18706472/18522509 -version 11.2.0.3.6 -oh /u01/app/oracle/product/11.2.0/db_home '
2014-07-16 02:18:32: Removing file /tmp/filepe8Glm
2014-07-16 02:18:32: Successfully removed file: /tmp/filepe8Glm
2014-07-16 02:18:32: /bin/su exited with rc=135
2014-07-16 02:18:32: The opatch minimum version check for patch /home/grid/18706472/18522509 failed for /u01/app/oracle/product/11.2.0/db_ho
me
2014-07-16 02:18:32: The opatch version check failed with following error
2014-07-16 02:18:32: Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation. All rights reserved.
ZOP-50: The patch location is not valid because it may be not exist or current user has no permission to access it.
Argument(s) Error... Patch Location not valid
Please check the arguments and try again.
## 將解壓檔案轉移到grid oracle都有 wrx 許可權的目錄下
[root@rhel grid]# mv /home/grid/18706472/ /tmp/
2.1.4 停止em agent
在oracle使用者下執行
命令 emctl status dbconsole 檢視是否在執行
執行命令 停止em:emctl stop dbconsole
2.2 檢查補丁衝突
grid使用者:
$ cd /tmp/18706472
$ ./$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/grid/product/11.2.0/grid
Central Inventory : /u01/app/oraInventory
from : /u01/app/grid/product/11.2.0/grid/oraInst.loc
OPatch version : 11.2.0.3.6
OUI version : 11.2.0.4.0
Log file location : /u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatch/opatch2014-07-16_02-04-49AM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
2.3 補丁安裝
實際環境:oracle single instance database and GI for standalone
根據readme中的資訊, 用root身份執行相關命令安裝補丁(無需停止GI),執行了命令後,會自動停止GI和所有資源;
然後在GI和DB的ORACLE_HOME下都安裝GI 和DB的PSU;
最後會GI和資源都啟動。
# opatch auto
opatch auto /home/grid/18706472 -ocmrf /u01/app/grid/product/11.2.0/grid/OPatch/ocm/bin/ocm.rsp ##出錯
Executing /u01/app/grid/product/11.2.0/grid/perl/bin/perl /u01/app/grid/product/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /home/grid -patchn 18706472 -ocmrf /u01/app/grid/product/11.2.0/grid/OPatch/ocm/bin/ocm.rsp -paramfile /u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params
This is the main log file: /u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto2014-07-16_02-18-19.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto2014-07-16_02-18-19.report.log
2014-07-16 02:18:19: Starting Oracle Restart Patch Setup
Using configuration parameter file: /u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params
The opatch minimum version check for patch /home/grid/18706472/18522509 failed for /u01/app/oracle/product/11.2.0/db_home
The opatch minimum version check for patch /home/grid/18706472/18522515/custom/server/18522515 failed for /u01/app/oracle/product/11.2.0/db_home
Opatch version check failed for oracle home /u01/app/oracle/product/11.2.0/db_home
Opatch version check failed
ERROR: update the opatch version for the failed homes and retry
opatch auto failed.
#第二次執行 執行成功
opatch auto /tmp/18706472 -ocmrf /u01/app/grid/product/11.2.0/grid/OPatch/ocm/bin/ocm.rsp
Executing /u01/app/grid/product/11.2.0/grid/perl/bin/perl /u01/app/grid/product/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /tmp -patchn 18706472 -ocmrf /u01/app/grid/product/11.2.0/grid/OPatch/ocm/bin/ocm.rsp -paramfile /u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params
This is the main log file: /u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto2014-07-16_02-39-59.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto2014-07-16_02-39-59.report.log
2014-07-16 02:39:59: Starting Oracle Restart Patch Setup
Using configuration parameter file: /u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params
Stopping RAC /u01/app/oracle/product/11.2.0/db_home ...
Stopped RAC /u01/app/oracle/product/11.2.0/db_home successfully
patch /tmp/18706472/18522509 apply successful for home /u01/app/oracle/product/11.2.0/db_home
patch /tmp/18706472/18522515/custom/server/18522515 apply successful for home /u01/app/oracle/product/11.2.0/db_home
Stopping CRS...
Stopped CRS successfully
patch /tmp/18706472/18522509 apply successful for home /u01/app/grid/product/11.2.0/grid
patch /tmp/18706472/18522515 apply successful for home /u01/app/grid/product/11.2.0/grid
patch /tmp/18706472/18522514 apply successful for home /u01/app/grid/product/11.2.0/grid
Starting CRS...
CRS-4123: Oracle High Availability Services has been started.
Starting RAC /u01/app/oracle/product/11.2.0/db_home ...
Started RAC /u01/app/oracle/product/11.2.0/db_home successfully
opatch auto succeeded.
2.4 Patch Post-InstallationInstructions
2.4.1 用oracle使用者連線到資料庫上:
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
sys@ANDREW> select version, id, bundle_series, comments from dba_registry_history;
VERSION ID BUNDLE_SERIES COMMENTS
------------------------------ ---------- ------------------------------ ----------------------------------------
11.2.0.4 0 PSU Patchset 11.2.0.2.0
11.2.0.4 3 PSU PSU 11.2.0.4.3
2.4.3 如果您使用了RMAN,需要將RMAN catalog庫升級一下,執行:
$ rman catalog andrew/password@ANDREWDB
RMAN> UPGRADE CATALOG;
Recovery Manager: Release 11.2.0.4.0 - Production on Wed Jul 16 03:12:31 2014
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to recovery catalog database
RMAN> upgrade catalog;
recovery catalog owner is RMAN
enter UPGRADE CATALOG command again to confirm catalog upgrade
RMAN> upgrade catalog;
recovery catalog upgraded to version 11.02.00.04
DBMS_RCVMAN package upgraded to version 11.02.00.04
DBMS_RCVCAT package upgraded to version 11.02.00.04
RMAN> exit
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/21754115/viewspace-1220674/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle Grid Infrastructure for a Standalone ServerOracleASTStructServer
- 【GRID】Grid Infrastructure 啟動的五大問題 (Doc ID 1526147.1)ASTStruct
- 為11gR2 Grid Infrastructure增加新的public網路ASTStruct
- 將Oracle 12c資料庫註冊到Oracle 19c Grid InfrastructureOracle資料庫ASTStruct
- 記錄一個 nameko standalone rpc 應答不消費導致阻塞的問題RPC
- 記錄一下
- RAC和ASM環境下打patchASM
- standalone執行模式下 應用模式作業部署模式
- 2024.4 記錄一下。。。
- 2024.7 記錄一下。
- CSS Grid Layout 手記(教程指南)CSS
- 如何使用git 生成patch 和打入patchGit
- LINUX 的patch 製作,及打patchLinux
- 打 patch 報錯:corrupt patch at line 36
- Chrome Extension 歷史記錄、下載記錄和儲存管理Chrome
- 美化完成記錄一下
- Mac下Charles踩坑記錄Mac
- Diff and Patch
- Oracle:GRID 下 root.sh 指令碼Oracle指令碼
- 記錄 VMware Workstation 官方下載方式
- Linux下MySQL多例項部署記錄LinuxMySql
- 記錄Mac下使用Charles抓包Mac
- 簡單記錄下wkhtmltoimage的使用HTML
- Spark Standalone模式 高可用部署Spark模式
- 記錄一下docker踩坑 /dev/shm目錄Dockerdev
- 2.3.3.4 Application PatchAPP
- netcore使用 jenkins + supervisor 實現standalone下多副本自動化釋出NetCoreJenkins
- Terraform基礎入門 (Infrastructure as Code)ORMASTStruct
- 初探 Infrastructure as Code 工具 Terraform vs PulumiASTStructORM
- Vue原始碼之patch順口溜了解一下Vue原始碼
- grid
- 論文筆記 Deep Patch Learning for Weakly Supervised Object Classication and Discovery筆記Object
- 記錄一下 Windows 下搭建 Homestead 的兩大坑Windows
- rust 語言試一下,記錄一下Rust
- 常用Linux命令,記錄一下,避免搞忘記!Linux
- 記錄一下MySQL的連線MySql
- 記錄一下藍芽學習藍芽
- 記錄一下 UOS 打包工具
- 記錄一下svgicon元件的使用SVG元件