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
- OJVM+GI PSU補丁升級JVM
- GI - GRID_HOME或grid使用者$ORACLE_HOME許可權被錯誤更改後如何恢復Oracle
- Oracle 11g RAC自動打GI PSU補丁Oracle
- $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithOracleAI
- Oracle 11g RAC自動打GI PSU補丁(11.2.0.4.8)Oracle
- 資料庫Oracle 11g RAC手動打GI PSU補丁(11.2.0.4.8)資料庫Oracle
- opatch需要在ORACLE_HOME為10.1.3下執行 ??Oracle
- GI的oifcfg命令
- Oracle CRS/GI 程式介紹Oracle
- Oracle Forum HOMEOracle
- AdGuard Home
- linux Oracle_RAC資料庫GI的PSU升級(11.2.0.4.0到11.2.0.4.8)LinuxOracle資料庫
- Laravel7.0 Route::get ()->name ('home') route ('home') 報錯Laravel
- [vue-router] Duplicate named routes definition: { name: "home", path: "/home" }Vue
- SAP系統自動產生GR/GI slip no.
- UIMotionEffect和Home頁背景視差效果UI
- 克隆(clone) ORACLE HOMEOracle
- Clone (克隆) ORACLE HOMEOracle
- Mobile Home車載按鈕試用:啟動Siri更方便
- win10 home和pro有什麼區別_win10pro和home是什麼版本Win10
- [重慶思莊每日技術分享]-$ORACLE_HOME/OPatch/ocm/bin/emocmrsp 不再有了Oracle
- Homestead 建立應用顯示 Could not delete /home/vagrant/code/weibodelete
- 關於GI和DATABASE軟體版本高低的問題Database
- GI安裝選項的說明
- spark_home的配置Spark
- mac set $java_homeMacJava
- Android 監聽home鍵的動作Android
- Reinstall ASM or DB HOME on One RAC Node From the Install Media_864614.1ASM
- 11gR2 GI和DB安裝目錄許可權屬主被修改後的恢復方法
- Patchset 11.2.0.4安裝,報找不到GI
- opatch 版本下載及psu下載
- ORACLE_BASE和ORACLE_HOME的區別Oracle
- ORA-15183 Unable to Create DB on Server using 11.2 ASM and GI_1054033.1ServerASM
- home鍵監聽(Android應用切換到後臺監聽)Android
- 如何找到JAVA_HOME | BaeldungJava
- clone grid INfrastructure Home and clusterwareASTStruct