GI PSU滾動方式應用GI HOME和DB HOME(opatch auto together)
GI PSU補丁可以以滾動方式應用GI HOME和DB HOME。注意下載補丁的存放位置應該是GI和db共享的目錄;
一、檢查rac沒法節點的opatch工具版本大於或等於11.2.0.3.6:rac每個節點都檢查
更新db和GI下的opatch工具:
$ unzip <OPATCH-ZIP> -d <ORACLE_HOME>
$ <ORACLE_HOME>/OPatch/opatch version
二、配置響應檔案:rac每個節點都操作
su - oracle
$ORACLE_HOME/OPatch/ocm/bin/emocmrsp -no_banner -output /home/oracle/ocm.rsp
chmod 775 /home/oracle/ocm.rsp
三、驗證有效期
-- Validation of Oracle Inventory(以GI和DB使用者分別執行)
$ORACLE_HOME/OPatch/opatch lsinventory -detail -oh $ORACLE_HOME
四、打補丁或回滾補丁前應停止EM程式(如果沒有安裝EM,則忽略)
su - oracle
<ORACLE_HOME>/bin/emctl stop dbconsole
五、升級PSU(As root user, execute the following command on each node of the cluster:不能並行執行)
--As root user, execute the following command on each node of the cluster:
以root使用者身份,在叢集的每個節點上執行以下命令:
注意:PSU補丁的存放位置應該是GI和db共享的目錄,並以GI下的opatch工具去執行
$ cd <UNZIPPED_PATCH_LOCATION>
$ unzip p27475913_112040_<platform>.zip
# opatch auto /tmp/27475913 -ocmrf /home/oracle/ocm.rsp
--解壓PSU補丁包
[oracle@dbrac2 ~]$ cd /tmp
[oracle@dbrac1 tmp]$ unzip p27475913_112040_Linux-x86-64.zip
--升級操作: /oracle/app/11.2.0/grid/OPatch/opatch auto /tmp/27475913/ -ocmrf /home/oracle/ocm.rsp
[root@dbrac1 tmp]# su - grid
[grid@dbrac1 ~]$ env|grep HOME
HOME=/home/grid
ORACLE_HOME=/oracle/app/11.2.0/grid
[grid@dbrac1 ~]$
[root@dbrac1 tmp]# /oracle/app/11.2.0/grid/OPatch/opatch auto /tmp/27475913/ -ocmrf /home/oracle/ocm.rsp
Executing /oracle/app/11.2.0/grid/perl/bin/perl /oracle/app/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /tmp -patchn 27475913 -ocmrf /home/oracle/ocm.rsp -paramfile /oracle/app/11.2.0/grid/crs/install/crsconfig_params
This is the main log file: /oracle/app/11.2.0/grid/cfgtoollogs/opatchauto2018-05-16_00-43-07.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/oracle/app/11.2.0/grid/cfgtoollogs/opatchauto2018-05-16_00-43-07.report.log
2018-05-16 00:43:07: Starting Clusterware Patch Setup
Using configuration parameter file: /oracle/app/11.2.0/grid/crs/install/crsconfig_params
Stopping RAC /oracle/app/oracle/product/11.2.0/dbhome_1 ...
Stopped RAC /oracle/app/oracle/product/11.2.0/dbhome_1 successfully
patch /tmp/27475913/27338049 apply successful for home /oracle/app/oracle/product/11.2.0/dbhome_1
patch /tmp/27475913/27441052/custom/server/27441052 apply successful for home /oracle/app/oracle/product/11.2.0/dbhome_1
Stopping CRS...
Stopped CRS successfully
patch /tmp/27475913/27338049 apply successful for home /oracle/app/11.2.0/grid
patch /tmp/27475913/27441052 apply successful for home /oracle/app/11.2.0/grid
patch /tmp/27475913/22502505 apply successful for home /oracle/app/11.2.0/grid
Starting CRS...
Installing Trace File Analyzer
CRS-4123: Oracle High Availability Services has been started.
Starting RAC /oracle/app/oracle/product/11.2.0/dbhome_1 ...
Started RAC /oracle/app/oracle/product/11.2.0/dbhome_1 successfully
opatch auto succeeded.
[root@dbrac1 tmp]#
節點2操作如上.............
[root@dbrac2 tmp]# /oracle/app/11.2.0/grid/OPatch/opatch auto /tmp/27475913/ -ocmrf /home/oracle/ocm.rsp
省略..........................
六、升級後資料庫註冊,跑指令碼:對於rac只需在一個節點上操作即可
--執行指令碼catbundle.sql
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> QUIT
The catbundle.sql execution is reflected in the dba_registry_history view by a row associated with bundle series PSU.
--編譯失效物件
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql
--檢查日誌有無報錯
catbundle_PSU_<database SID>_APPLY_<TIMESTAMP>.log
catbundle_PSU_<database SID>_GENERATE_<TIMESTAMP>.log
--如果在使用rman恢復目錄,則執行如下:
$ rman catalog username/password@alias
RMAN> UPGRADE CATALOG;
--跑完後驗證:
SQL> select * from dba_registry_history;
ACTION_TIME ACTION NAMESPACE VERSION ID BUNDLE_SERIES COMMENTS
------------------------------ ---------- --------------- --------------- ---------- --------------- -------------------------
24-AUG-13 12.03.45.119862 PM APPLY SERVER 11.2.0.4 0 PSU Patchset 11.2.0.2.0
16-OCT-17 10.12.28.771351 PM APPLY SERVER 11.2.0.4 0 PSU Patchset 11.2.0.2.0
07-MAR-18 06.07.41.694205 AM APPLY SERVER 11.2.0.4 161018 PSU PSU 11.2.0.4.161018
30-MAR-18 03.39.07.129649 PM APPLY SERVER 11.2.0.4 170718 PSU PSU 11.2.0.4.170718
15-MAY-18 11.32.57.424765 PM APPLY SERVER 11.2.0.4 180116 PSU PSU 11.2.0.4.180116
16-MAY-18 02.00.48.476152 AM APPLY SERVER 11.2.0.4 180417 PSU PSU 11.2.0.4.180417
6 rows selected.
七、回滾PSU
--root身份執行:
As root user, execute the following command on each node of the cluster.
# opatch auto <UNZIPPED_PATCH_LOCATION>/27475913 -rollback -ocmrf <ocm response file>
八、回滾後註冊:在執行打補丁註冊後的節點上執行回滾後註冊
8.1 Start all database instances running from the Oracle home
8.2 執行指令碼
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle_PSU_<database SID PREFIX>_ROLLBACK.sql
SQL> QUIT
8.3 編譯失效物件
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql
8.4 Check the log file for any errors.
The log file is found in $ORACLE_BASE/cfgtoollogs/catbundle and is named catbundle_PSU_<database SID>_ROLLBACK_<TIMESTAMP>.log where TIMESTAMP is of the form YYYYMMMDD_HH_MM_SS. If there are error.
8.5 檢查
$ opatch lsinventory
一、檢查rac沒法節點的opatch工具版本大於或等於11.2.0.3.6:rac每個節點都檢查
更新db和GI下的opatch工具:
$ unzip <OPATCH-ZIP> -d <ORACLE_HOME>
$ <ORACLE_HOME>/OPatch/opatch version
二、配置響應檔案:rac每個節點都操作
su - oracle
$ORACLE_HOME/OPatch/ocm/bin/emocmrsp -no_banner -output /home/oracle/ocm.rsp
chmod 775 /home/oracle/ocm.rsp
三、驗證有效期
-- Validation of Oracle Inventory(以GI和DB使用者分別執行)
$ORACLE_HOME/OPatch/opatch lsinventory -detail -oh $ORACLE_HOME
四、打補丁或回滾補丁前應停止EM程式(如果沒有安裝EM,則忽略)
su - oracle
<ORACLE_HOME>/bin/emctl stop dbconsole
五、升級PSU(As root user, execute the following command on each node of the cluster:不能並行執行)
--As root user, execute the following command on each node of the cluster:
以root使用者身份,在叢集的每個節點上執行以下命令:
注意:PSU補丁的存放位置應該是GI和db共享的目錄,並以GI下的opatch工具去執行
$ cd <UNZIPPED_PATCH_LOCATION>
$ unzip p27475913_112040_<platform>.zip
# opatch auto /tmp/27475913 -ocmrf /home/oracle/ocm.rsp
--解壓PSU補丁包
[oracle@dbrac2 ~]$ cd /tmp
[oracle@dbrac1 tmp]$ unzip p27475913_112040_Linux-x86-64.zip
--升級操作: /oracle/app/11.2.0/grid/OPatch/opatch auto /tmp/27475913/ -ocmrf /home/oracle/ocm.rsp
[root@dbrac1 tmp]# su - grid
[grid@dbrac1 ~]$ env|grep HOME
HOME=/home/grid
ORACLE_HOME=/oracle/app/11.2.0/grid
[grid@dbrac1 ~]$
[root@dbrac1 tmp]# /oracle/app/11.2.0/grid/OPatch/opatch auto /tmp/27475913/ -ocmrf /home/oracle/ocm.rsp
Executing /oracle/app/11.2.0/grid/perl/bin/perl /oracle/app/11.2.0/grid/OPatch/crs/patch11203.pl -patchdir /tmp -patchn 27475913 -ocmrf /home/oracle/ocm.rsp -paramfile /oracle/app/11.2.0/grid/crs/install/crsconfig_params
This is the main log file: /oracle/app/11.2.0/grid/cfgtoollogs/opatchauto2018-05-16_00-43-07.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/oracle/app/11.2.0/grid/cfgtoollogs/opatchauto2018-05-16_00-43-07.report.log
2018-05-16 00:43:07: Starting Clusterware Patch Setup
Using configuration parameter file: /oracle/app/11.2.0/grid/crs/install/crsconfig_params
Stopping RAC /oracle/app/oracle/product/11.2.0/dbhome_1 ...
Stopped RAC /oracle/app/oracle/product/11.2.0/dbhome_1 successfully
patch /tmp/27475913/27338049 apply successful for home /oracle/app/oracle/product/11.2.0/dbhome_1
patch /tmp/27475913/27441052/custom/server/27441052 apply successful for home /oracle/app/oracle/product/11.2.0/dbhome_1
Stopping CRS...
Stopped CRS successfully
patch /tmp/27475913/27338049 apply successful for home /oracle/app/11.2.0/grid
patch /tmp/27475913/27441052 apply successful for home /oracle/app/11.2.0/grid
patch /tmp/27475913/22502505 apply successful for home /oracle/app/11.2.0/grid
Starting CRS...
Installing Trace File Analyzer
CRS-4123: Oracle High Availability Services has been started.
Starting RAC /oracle/app/oracle/product/11.2.0/dbhome_1 ...
Started RAC /oracle/app/oracle/product/11.2.0/dbhome_1 successfully
opatch auto succeeded.
[root@dbrac1 tmp]#
節點2操作如上.............
[root@dbrac2 tmp]# /oracle/app/11.2.0/grid/OPatch/opatch auto /tmp/27475913/ -ocmrf /home/oracle/ocm.rsp
省略..........................
六、升級後資料庫註冊,跑指令碼:對於rac只需在一個節點上操作即可
--執行指令碼catbundle.sql
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> QUIT
The catbundle.sql execution is reflected in the dba_registry_history view by a row associated with bundle series PSU.
--編譯失效物件
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql
--檢查日誌有無報錯
catbundle_PSU_<database SID>_APPLY_<TIMESTAMP>.log
catbundle_PSU_<database SID>_GENERATE_<TIMESTAMP>.log
--如果在使用rman恢復目錄,則執行如下:
$ rman catalog username/password@alias
RMAN> UPGRADE CATALOG;
--跑完後驗證:
SQL> select * from dba_registry_history;
ACTION_TIME ACTION NAMESPACE VERSION ID BUNDLE_SERIES COMMENTS
------------------------------ ---------- --------------- --------------- ---------- --------------- -------------------------
24-AUG-13 12.03.45.119862 PM APPLY SERVER 11.2.0.4 0 PSU Patchset 11.2.0.2.0
16-OCT-17 10.12.28.771351 PM APPLY SERVER 11.2.0.4 0 PSU Patchset 11.2.0.2.0
07-MAR-18 06.07.41.694205 AM APPLY SERVER 11.2.0.4 161018 PSU PSU 11.2.0.4.161018
30-MAR-18 03.39.07.129649 PM APPLY SERVER 11.2.0.4 170718 PSU PSU 11.2.0.4.170718
15-MAY-18 11.32.57.424765 PM APPLY SERVER 11.2.0.4 180116 PSU PSU 11.2.0.4.180116
16-MAY-18 02.00.48.476152 AM APPLY SERVER 11.2.0.4 180417 PSU PSU 11.2.0.4.180417
6 rows selected.
七、回滾PSU
--root身份執行:
As root user, execute the following command on each node of the cluster.
# opatch auto <UNZIPPED_PATCH_LOCATION>/27475913 -rollback -ocmrf <ocm response file>
八、回滾後註冊:在執行打補丁註冊後的節點上執行回滾後註冊
8.1 Start all database instances running from the Oracle home
8.2 執行指令碼
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle_PSU_<database SID PREFIX>_ROLLBACK.sql
SQL> QUIT
8.3 編譯失效物件
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql
8.4 Check the log file for any errors.
The log file is found in $ORACLE_BASE/cfgtoollogs/catbundle and is named catbundle_PSU_<database SID>_ROLLBACK_<TIMESTAMP>.log where TIMESTAMP is of the form YYYYMMMDD_HH_MM_SS. If there are error.
8.5 檢查
$ opatch lsinventory
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/31397003/viewspace-2154540/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- GI PSU打補丁之opatch auto 自動方式分別打GI_HOME和ORACLE_HOMEOracle
- PSU的GI升級,ERROR: This patch is not applicable to GI home.ErrorAPP
- $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithOracleAI
- OJVM+GI PSU補丁升級JVM
- Oracle 11g RAC自動打GI PSU補丁Oracle
- AdGuard Home
- Homestead 建立應用顯示 Could not delete /home/vagrant/code/weibodelete
- [vue-router] Duplicate named routes definition: { name: "home", path: "/home" }Vue
- Laravel7.0 Route::get ()->name ('home') route ('home') 報錯Laravel
- [重慶思莊每日技術分享]-$ORACLE_HOME/OPatch/ocm/bin/emocmrsp 不再有了Oracle
- 初始化home
- win10 home和pro有什麼區別_win10pro和home是什麼版本Win10
- spark_home的配置Spark
- AdGuard Home使用體驗
- 管理(006):啟用只讀Oracle Home目錄Oracle
- 如何找到JAVA_HOME | BaeldungJava
- Renovation Tour-Record my home
- Returning Home(建圖、最短路)
- export GRID_HOME=/u01/app/19c/grid $GRID_HOME/bin/crExportAPP
- vue-router.esm.js:17 [vue-router] Duplicate named routes definition: { name: “home“, path: “/home“ }VueJS
- appium 執行還需要 java home?APPJava
- 雲伺服器搭建 AdGuard Home伺服器
- cannot download, /home/azhukov/go is a GOROOT, not a GOPATHGo
- POJ2387-Til the Cows Come Home
- MLE 5217 : Take-Home Dataset Classification
- 關於CATALINA_HOME 和 CATALINA_BASE 的區別
- Android Home鍵、鎖屏鍵監聽Android
- DroidPlugin手札——home鍵強殺處理Plugin
- 備份與恢復oracle_homeOracle
- CodeForces_1422D Returning Home(最短路)
- cloudera-manager 設定 JAVA_HOMECloudJava
- 題解:[ABC379D] Home Garden
- Android Home鍵之後啟動Activity延遲5sAndroid
- root.sh Fails on the First Node for 11gR2 GI InstallationAI
- 安裝ORACLE 12.2.0.1 GI 時遇到INS-44002錯誤Oracle
- 湯加“斷聯” 全球海底電纜有多脆弱?GI
- Oracle 12.2應用PSU後資料庫無法啟動Oracle資料庫
- win10 home如何轉旗艦版_win10 home升級到旗艦版最新教程Win10