Oracle 11g RAC 打補丁過程(11.2.0.3.15)
--關閉EM
emctl status dbconsole
emctl stop dbconsole
--關閉資料庫和監聽
srvctl stop database -d ptfdb
srvctl stop listener -n ptfdb1
srvctl stop listener -n ptfdb2
1、檢視資料庫安裝的補丁
$ORACLE_HOME/OPatch/opatch lsinventory
2、解壓 patch 包
unzip p20760997_112030_Linux-x86-64.zip
cd 20760997/
3、檢查是否滿足補丁安裝條件
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
4、安裝補丁
cd 20760997
$ORACLE_HOME/OPatch/opatch apply
在安裝補丁的過程中,安裝完本地補丁後,會提示是否安裝遠端節點的補丁,選擇是即可。
5、安裝補丁後的操作
--啟動資料庫和監聽
srvctl start database -d ptfdb
srvctl start listener -n ptfdb1
srvctl start listener -n ptfdb2
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
CONNECT / AS SYSDBA
STARTUP
@catbundle.sql psu apply
QUIT
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql
--檢查安裝的補丁
select * from dba_registry_history;
SELECT comp_name, version, status FROM dba_registry;
6、安裝中的報錯
--報錯一
SQL> execute dbms_java.loadjava('-synonym -schema ORDSYS -resolve -grant PUBLIC ord/jlib/ordimann.jar');
BEGIN dbms_java.loadjava('-synonym -schema ORDSYS -resolve -grant PUBLIC ord/jlib/ordimann.jar'); END;
*
ERROR at line 1:
ORA-04031: unable to allocate 4096 bytes of shared memory ("java
pool","java/io/Serializable","JOXLE^1b45c29",":SGAClass")
ORA-06512: at "SYS.DBMS_JAVA", line 655
ORA-06512: at line 1
SQL> execute dbms_java.loadjava('-grant PUBLIC -schema ORDSYS ord/jlib/jai_core.jar');
BEGIN dbms_java.loadjava('-grant PUBLIC -schema ORDSYS ord/jlib/jai_core.jar'); END;
*
ERROR at line 1:
ORA-04031: unable to allocate 4096 bytes of shared memory ("java
pool","java/io/Serializable","JOXLE^1b45c29",":SGAClass")
ORA-06512: at "SYS.DBMS_JAVA", line 655
ORA-06512: at line 1
Invoking prereq "checkconflictagainstohwithdetail"
OracleHomeInventory was not able to create a lock file, probably due to a failed OPatch Session. The loaded inventory might not show correctly what you have in the Oracle Home.
--解決方法
這是由於JAVA池分配的太小了,更改JAVA池後,重啟資料庫。
alter system set java_pool_size=300M scope=spfile;
--報錯二
OUI-67076:OracleHomeInventory was not able to create a lock file, probably due to a failed OPatch Session. The loaded inventory might not show correctly what you have in the Oracle Home.
--解決方法
cd $ORACLE_HOME/.patch_storage
mv patch_locked patch_locked.back
--報錯三
Following executables are active :
/u01/app/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1
UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.
Log file location: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/16902043_Jan_13_2016_14_27_14/rollback2016-01-13_14-27-14PM_1.log
--解決方法
如有未清除程式,則執行下列命令
fuser -k /u01/app/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1
--報錯四
OPatch found the word "warning" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
ins_precomp.mk:19: warning: overriding commands for target `pcscfg.cfg'
/u01/app/oracle/product/11.2.0/db_1/precomp/lib/env_precomp.mk:2160: warning: ignoring old commands for target `pcscfg.cfg'
/u01/app/oracle/product/11.2.0/db_1/precomp/lib/ins_precomp.mk:19: warning: overriding commands for target `pcscfg.cfg'
/u01/app/oracle/product/11.2.0/db_1/precomp/lib/env_precomp.mk:2160: warning: ignoring old commands for target `pcscfg.cfg'
OPatch found the word "warning" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
ins_emagent.mk:113: warning: overriding commands for target `nmosudo'
ins_emagent.mk:52: warning: ignoring old commands for target `nmosudo'
/u01/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk:113: warning: overriding commands for target `nmosudo'
/u01/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk:52: warning: ignoring old commands for target `nmosudo'
--解決方法
這是一個正常的警告,實際上補丁已經更新成功。
7、補丁回退的方法
$ORACLE_HOME/OPatch/opatch rollback -id 20760997
emctl status dbconsole
emctl stop dbconsole
--關閉資料庫和監聽
srvctl stop database -d ptfdb
srvctl stop listener -n ptfdb1
srvctl stop listener -n ptfdb2
1、檢視資料庫安裝的補丁
$ORACLE_HOME/OPatch/opatch lsinventory
2、解壓 patch 包
unzip p20760997_112030_Linux-x86-64.zip
cd 20760997/
3、檢查是否滿足補丁安裝條件
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
4、安裝補丁
cd 20760997
$ORACLE_HOME/OPatch/opatch apply
在安裝補丁的過程中,安裝完本地補丁後,會提示是否安裝遠端節點的補丁,選擇是即可。
5、安裝補丁後的操作
--啟動資料庫和監聽
srvctl start database -d ptfdb
srvctl start listener -n ptfdb1
srvctl start listener -n ptfdb2
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
CONNECT / AS SYSDBA
STARTUP
@catbundle.sql psu apply
QUIT
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql
--檢查安裝的補丁
select * from dba_registry_history;
SELECT comp_name, version, status FROM dba_registry;
6、安裝中的報錯
--報錯一
SQL> execute dbms_java.loadjava('-synonym -schema ORDSYS -resolve -grant PUBLIC ord/jlib/ordimann.jar');
BEGIN dbms_java.loadjava('-synonym -schema ORDSYS -resolve -grant PUBLIC ord/jlib/ordimann.jar'); END;
*
ERROR at line 1:
ORA-04031: unable to allocate 4096 bytes of shared memory ("java
pool","java/io/Serializable","JOXLE^1b45c29",":SGAClass")
ORA-06512: at "SYS.DBMS_JAVA", line 655
ORA-06512: at line 1
SQL> execute dbms_java.loadjava('-grant PUBLIC -schema ORDSYS ord/jlib/jai_core.jar');
BEGIN dbms_java.loadjava('-grant PUBLIC -schema ORDSYS ord/jlib/jai_core.jar'); END;
*
ERROR at line 1:
ORA-04031: unable to allocate 4096 bytes of shared memory ("java
pool","java/io/Serializable","JOXLE^1b45c29",":SGAClass")
ORA-06512: at "SYS.DBMS_JAVA", line 655
ORA-06512: at line 1
Invoking prereq "checkconflictagainstohwithdetail"
OracleHomeInventory was not able to create a lock file, probably due to a failed OPatch Session. The loaded inventory might not show correctly what you have in the Oracle Home.
--解決方法
這是由於JAVA池分配的太小了,更改JAVA池後,重啟資料庫。
alter system set java_pool_size=300M scope=spfile;
--報錯二
OUI-67076:OracleHomeInventory was not able to create a lock file, probably due to a failed OPatch Session. The loaded inventory might not show correctly what you have in the Oracle Home.
--解決方法
cd $ORACLE_HOME/.patch_storage
mv patch_locked patch_locked.back
--報錯三
Following executables are active :
/u01/app/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1
UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.
Log file location: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/16902043_Jan_13_2016_14_27_14/rollback2016-01-13_14-27-14PM_1.log
如有未清除程式,則執行下列命令
fuser -k /u01/app/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1
--報錯四
OPatch found the word "warning" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
ins_precomp.mk:19: warning: overriding commands for target `pcscfg.cfg'
/u01/app/oracle/product/11.2.0/db_1/precomp/lib/env_precomp.mk:2160: warning: ignoring old commands for target `pcscfg.cfg'
/u01/app/oracle/product/11.2.0/db_1/precomp/lib/ins_precomp.mk:19: warning: overriding commands for target `pcscfg.cfg'
/u01/app/oracle/product/11.2.0/db_1/precomp/lib/env_precomp.mk:2160: warning: ignoring old commands for target `pcscfg.cfg'
OPatch found the word "warning" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
ins_emagent.mk:113: warning: overriding commands for target `nmosudo'
ins_emagent.mk:52: warning: ignoring old commands for target `nmosudo'
/u01/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk:113: warning: overriding commands for target `nmosudo'
/u01/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emagent.mk:52: warning: ignoring old commands for target `nmosudo'
--解決方法
這是一個正常的警告,實際上補丁已經更新成功。
7、補丁回退的方法
$ORACLE_HOME/OPatch/opatch rollback -id 20760997
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26506993/viewspace-1976664/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 19c RAC打補丁過程避坑指南Oracle
- 安裝oracle 11g RAC時打8670579?補丁Oracle
- Oracle 11g RAC自動打GI PSU補丁Oracle
- Oracle EBS APP & DB 打補丁過程簡述OracleAPP
- Oracle 11g RAC自動打GI PSU補丁(11.2.0.4.8)Oracle
- Oracle RAC 19.3打19.5.1 RU補丁Oracle
- Oracle 11g RAC 環境打PSU補丁的詳細步驟Oracle
- 資料庫Oracle 11g RAC手動打GI PSU補丁(11.2.0.4.8)資料庫Oracle
- Oracle RAC更新補丁Oracle
- oracle 19c rac打補丁常見錯誤Oracle
- oracle打補丁回顧Oracle
- Oracle EBS中打補丁Oracle
- oracle 11g 單例項打補丁操作步驟Oracle單例
- ORACLE RAC的全自動 打補丁標準化文件Oracle
- oracle_如何打11GR2 RAC PSU補丁Oracle
- 使用OPatch給Oracle打補丁Oracle
- ORACLE打補丁的方法和案例Oracle
- ORACLE11G DG打補丁Oracle
- Oracle資料庫打補丁方法Oracle資料庫
- oracle 小補丁能全部打嗎?Oracle
- 【opatch】Oracle打補丁工具opatch簡介Oracle
- 在windows上打Oracle的CPU補丁WindowsOracle
- 給Oracle資料庫打補丁(轉)Oracle資料庫
- oracle 11G RAC 建立詳細過程Oracle
- ORACLE 11g 升級補丁(Patch)Oracle
- 單機 Oracle 11g(11.2.0.4)手動打補丁PSU(11.2.0.4.8)Oracle
- ORACLE 10G RAC 升級補丁Oracle 10g
- 【UP_ORACLE】如何給Oracle DG打補丁(二)備庫安裝補丁步驟Oracle
- 【UP_ORACLE】如何給Oracle DG打補丁(三)主庫安裝補丁步驟Oracle
- ORACLE 19C RAC FOR RHEL7 打補丁報錯OPatchException: Unable to create patchObjectOracleExceptionObject
- Oracle RAC 第二節點打補丁報錯 oui-patch.xml (Permission denied)OracleUIXML
- Oracle Goldengate 12c打pus補丁OracleGo
- 記一次12c pdb打補丁失敗處理過程
- 檢視系統已經打過的補丁
- 打Oracle最新CPU patch與打臨時補丁的區別Oracle
- 給oracle打Patch 9352237補丁Oracle
- [重慶思莊每日技術分享]-11G 打補丁遇到:unable to get oracle owner forOracle
- oracle 補丁Oracle