Oracle 11g升級PSU詳細步驟
oracle 每個季度都會發布最新的補丁。對於生產運維人員來說,定期升級系統、打補丁是日常工作中不可缺少的部分。
相對於過去的版本,Oracle打補丁的方式已經變得比較簡單,處理PSU的方法也發生了一些變化。在11g中,對於一些小bug的修復,我們可以使用OPatch工具進行補丁修復。對於大的版本升級,Oracle的PSU實際上就是一系列全新的安裝檔案,從MOS上下載之後就可以直接進行安裝。
1、關閉
Oracle的PSU升級不更新資料字典,風險較小,但是還是需要停庫進行升級操作。
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
停止監聽服務。
[oracle@bntjftest 20299015]$ lsnrctl stop
檢查服務程式
[oracle@bntjftest 20299015]$ ps aux | grep ora_
oracle 6922 0.0 0.0 5700 796 pts/3 S+ 17:48 0:00 grep ora_
[oracle@bntjftest 20299015]$ ps aux | grep tns
oracle 6924 0.0 0.0 5704 796 pts/3 S+ 17:48 0:00 grep tns
2、檢查opatch版本資訊,需要的話進行升級
[oracle@bntjftest OPatch]$ ./opatch version
OPatch Version: 11.2.0.1.7
OPatch succeeded.
檢查發現opatch版本較低,為預設版本,所以需要升級opatch。升級方法很簡單,直接mv掉原來的opatch目錄,然後解壓最新版本的opatch軟體到ORACLE_HOME下面即可
[oracle@bntjftest OPatch]$ unzip p6880880_112000_Linux-x86-64-opatch .zip -d $ORACLE_HOME
再次檢查版本,發現已經升級成功。
[oracle@bntjftest OPatch]$ ./opatch version
OPatch Version: 11.2.0.3.6
OPatch succeeded.
3、應用PSU補丁
1)插曲一、安裝錯誤
[oracle@bntjftest OPatch]$ ./opatch apply ./20299015/
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation. All rights reserved.
Oracle Home : /app/oracle/product/11.2.0/dbhome_1
Central Inventory : /app/oraInventory
from : /app/oracle/product/11.2.0/dbhome_1/oraInst.loc
OPatch version : 11.2.0.3.6
OUI version : 11.2.0.4.0
Log file location : /app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-05-14_10-45-03AM_1.log
Verifying environment and perming prerequisite checks...
Prerequisite check "CheckPatchApplicableOnCurrentPlatform" failed.
The details are:
Patch ( 20299015 ) is not applicable>UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.
Log file location: /app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-05-14_10-45-03AM_1.log
OPatch failed with error code 73
不使用自動模式,手工執行,一樣報錯:
[oracle@bntjftest 20299015]$ /app/oracle/product/11.2.0/dbhome_1/OPatch/opatch napply -skip_subset -skip_duplicate
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation. All rights reserved.
Oracle Home : /app/oracle/product/11.2.0/dbhome_1
Central Inventory : /app/oraInventory
from : /app/oracle/product/11.2.0/dbhome_1/oraInst.loc
OPatch version : 11.2.0.3.6
OUI version : 11.2.0.4.0
Log file location : /app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-05-14_10-45-03AM_1.log
Verifying environment and perming prerequisite checks...
Prerequisite check "CheckPatchApplicableOnCurrentPlatform" failed.
The details are:
Patch ( 20299015 ) is not applicable>UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.
Log file location: /app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-05-14_10-45-03AM_1.log
OPatch failed with error code 73
上網baidu,“ UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed”, 很快就查到解決辦法,明確了其實就是因為有使用者程式佔用了檔案libclntsh.so.11
[oracle@bntjftest 20299015]$ /s/fuser /app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11 .1
/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1: 16470m
[oracle@bntjftest 20299015]$ ps -ef | grep 16470
oracle 16470 5399 0 14:45 pts/2 00:00:00 sqlplus as sysdba
oracle 7780 6617 0 18:47 pts/3 00:00:00 grep 16470
[oracle@bntjftest 20299015]$ kill -9 16470
[oracle@bntjftest 20299015]$ /sbin/fuser /app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1
3)再次重新應用PSU補丁,成功
[oracle@bntjftest 20299015]$ /app/oracle/product/11.2.0/dbhome_1/OPatch/opatch napply -skip_subset -skip_duplicate
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation. All rights reserved.
Oracle Home : /app/oracle/product/11.2.0/dbhome_1
Central Inventory : /app/oraInventory
from : /app/oracle/product/11.2.0/dbhome_1/oraInst.loc
OPatch version : 11.2.0.3.6
OUI version : 11.2.0.4.0
Log file location : /app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-05-14_10-45-03AM_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: [17811429 17811438 17811447 18203835 18203837 18203838 19463893 19544839 19584068 19972564 19972566 19972568 19972569 20142975 20299015 20506699 20506715 20631274]
Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
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
OPatch Session completed with warnings.
Log file location: /app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-05-14_10-45-03AM_1.log
OPatch completed with warnings.
4、檢查應用之後的結果
[oracle@bntjftest 20299015]$ ../opatch lspatches
20631274;
20506715;
20506699;
20299015;
20142975;
19972569;
19972568;
19972566;
19972564;
19584068;
19544839;
19463893;
18203838;
18203837;
18203835;
17811447;
17811438;
17811429;
[oracle@bntjftest 20299015]$ ../opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation. All rights reserved.
Oracle Home : /app/oracle/product/11.2.0/dbhome_1
Central Inventory : /app/oraInventory
from : /app/oracle/product/11.2.0/dbhome_1/oraInst.loc
OPatch version : 11.2.0.3.6
OUI version : 11.2.0.4.0
Log file location : /app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2015-05-14_11-04-15AM_1.log
Lsinventory Output file location : /app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2015-05-14_11-04-15AM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.4.0
There are 1 product(s) installed in this Oracle Home.
Interim patches (18) :
Patch 20631274 : applied on Wed May 13 17:11:06 CST 2015
Unique Patch ID: 18695736
Created on 13 Mar 2015, 10:25:35 hrs PST8PDT
Bugs fixed:
20296213, 17600719, 19458377, 19554106, 20631274, 16524926, 19466309
Patch 20506715 : applied on Wed May 13 17:11:02 CST 2015
Unique Patch ID: 18695736
Created on 13 Mar 2015, 10:23:10 hrs PST8PDT
Bugs fixed:
19049453, 19915271, 16450169, 17006570, 17811456, 18554871, 17786278
18096714, 18744139, 20506715, 18061914
Patch 20506699 : applied on Wed May 13 17:10:57 CST 2015
Unique Patch ID: 18695736
Created on 13 Mar 2015, 11:23:48 hrs PST8PDT
Bugs fixed:
20506699, 19358317, 19197175, 19972570, 17762296
Patch 20299015 : applied on Wed May 13 17:10:54 CST 2015
Unique Patch ID: 18695736
Created on 13 Mar 2015, 10:28:05 hrs PST8PDT
Bugs fixed:
20299015, 18139690, 18681862, 17343514, 19727057, 19271443, 19854503, 17551709
Patch 20142975 : applied on Wed May 13 17:10:53 CST 2015
Unique Patch ID: 18406185
Created on 22 Dec 2014, 00:47:05 hrs PST8PDT
Bugs fixed:
19827973, 19463897, 19289642, 20142975
Patch 19972569 : applied on Wed May 13 17:10:51 CST 2015
Unique Patch ID: 18406185
Created on 22 Dec 2014, 00:21:09 hrs PST8PDT
Bugs fixed:
19972569, 19006849
Patch 19972568 : applied on Wed May 13 17:10:50 CST 2015
Unique Patch ID: 18406185
Created on 22 Dec 2014, 00:13:36 hrs PST8PDT
Bugs fixed:
19972568, 19309466
Patch 19972566 : applied on Wed May 13 17:10:48 CST 2015
Unique Patch ID: 18406185
Created on 22 Dec 2014, 00:03:20 hrs PST8PDT
Bugs fixed:
19972566, 18641461, 18641451
Patch 19972564 : applied on Wed May 13 17:10:45 CST 2015
Unique Patch ID: 18406185
Created on 21 Dec 2014, 23:54:58 hrs PST8PDT
Bugs fixed:
19972564, 18436647
Patch 19584068 : applied on Wed May 13 17:10:43 CST 2015
Unique Patch ID: 18084194
Created on 24 Sep 2014, 07:43:52 hrs PST8PDT
Bugs fixed:
18262334, 19584068
Patch 19544839 : applied on Wed May 13 17:10:40 CST 2015
Unique Patch ID: 18084194
Created on 11 Oct 2014, 01:43:34 hrs PST8PDT
Bugs fixed:
18673325, 19544839, 19211724, 18673304
Patch 19463893 : applied on Wed May 13 17:10:26 CST 2015
Unique Patch ID: 18084194
Created on 24 Sep 2014, 06:28:06 hrs PST8PDT
Bugs fixed:
19463893, 18641419
Patch 18203838 : applied on Wed May 13 17:10:24 CST 2015
Unique Patch ID: 17351342
Created on 26 Feb 2014, 23:57:58 hrs PST8PDT
Bugs fixed:
17865671, 18203838
Patch 18203837 : applied on Wed May 13 17:10:21 CST 2015
Unique Patch ID: 17351342
Created on 26 Feb 2014, 23:48:38 hrs PST8PDT
Bugs fixed:
17716305, 18203837
Patch 18203835 : applied on Wed May 13 17:10:19 CST 2015
Unique Patch ID: 17351342
Created on 26 Feb 2014, 23:43:04 hrs PST8PDT
Bugs fixed:
17721717, 18203835
Patch 17811447 : applied on Wed May 13 17:10:17 CST 2015
Unique Patch ID: 17066906
Created on 11 Dec 2013, 02:20:51 hrs PST8PDT
Bugs fixed:
17811447, 17088068
Patch 17811438 : applied on Wed May 13 17:10:15 CST 2015
Unique Patch ID: 17066906
Created on 11 Dec 2013, 02:37:11 hrs PST8PDT
Bugs fixed:
17811438, 16721594
Patch 17811429 : applied on Wed May 13 17:10:13 CST 2015
Unique Patch ID: 17066906
Created on 11 Dec 2013, 02:36:54 hrs PST8PDT
Bugs fixed:
17811429, 13944971
--------------------------------------------------------------------------------
OPatch succeeded.
SQL> select * from dba_registry_history;
ACTION_TIME ACTION NAMESPAC VERSION ID BUNDL COMMENTS
------------------------------ -------- -------- ---------- ---------- ----- --------------------
05-MAY-15 09.24.08.184589 AM APPLY SERVER 11.2.0.4 0 PSU Patchset 11.2.0.2.0
13-MAY-15 05.17.48.578053 PM APPLY SERVER 11.2.0.4 6 CPU CPUApr2015
2 rows selected.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12798004/viewspace-1654011/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 10g/11g 升級psu步驟Oracle 10g
- Oracle從10g升級到11g詳細步驟Oracle
- ORACLE資料庫升級詳細步驟Oracle資料庫
- Oracle從10g升級到11g詳細操作步驟Oracle
- Oracle 11g RAC 環境打PSU補丁的詳細步驟Oracle
- 曲折的gcc升級詳細步驟GC
- MySQL 升級詳細步驟 (包括 Percona)MySql
- oracle升級步驟Oracle
- Linux Oracle 11g Dataguard配置詳細步驟LinuxOracle
- 超詳細oracle 11g安裝步驟 win版本Oracle
- Oracle Stream配置詳細步驟Oracle
- ORACLE 11G 搭建dataguard詳細步驟(所有操作總結)Oracle
- SAP 補丁升級步驟詳解 (轉)
- ORACLE 10G data guard 升級步驟Oracle 10g
- oracle 10.1.0.2 升級到10.2.0.4 步驟Oracle
- linux 核心升級步驟,kernel升級Linux
- oracle 11g 11.1.0.6.0升級到11g 11.1.0.7.0 for aix 5L操作步驟OracleAI
- windows10怎樣升級到10586_windows10電腦升級到10586詳細步驟Windows
- oracle 10.2.0.4 rac 升級到oracle 10.2.0.5 rac步驟Oracle
- Oracle Stream配置詳細步驟(使用者模式)Oracle模式
- 配置PLSQL Developer詳細步驟SQLDeveloper
- IOS之GCD詳細步驟iOSGC
- ORACLE 11g R2 RAC 11.2.0.2.12 PSU 安裝升級Oracle
- 【ASK_ORACLE】Relink RAC叢集詳細步驟Oracle
- Oracle 高階複製配置步驟詳細說明Oracle
- mysql 5.5.42升級到5.6.24步驟MySql
- GoldenGate軟體升級步驟Go
- dp安裝包升級步驟
- CATIA許可證升級步驟
- A*演算法(超級詳細講解,附有舉例的詳細手寫步驟)演算法
- Oracle資料庫從 9.2.0.1 到 9.2.0.8升級步驟 for winOracle資料庫
- LVM建立的詳細步驟LVM
- docker安裝portainer詳細步驟DockerAI
- MySQL的安裝步驟(詳細)MySql
- mysql建立master/slave詳細步驟MySqlAST
- Github配置ssh key詳細步驟Github
- Oracle10.2.0.1 升級到Oracle10.2.0.4 簡單步驟Oracle
- 12.1.0.2 單機 升級 19.16 RAC步驟詳解