Oracle 11.2.0.4 单实例打PSU补丁的过程(linux64)
微信公众号:云库管 www.yunDBA.com
北京云库管科技有限公司 (内部培训资料)
返回上级
本文记录了打PSU的全过程,过程分成4部分。
1.OPatch替换为最新版本
2.数据库软件应用19121551补丁程序
3.数据库应用补丁
4.验证PSU补丁是否应用成功
1.OPatch替换为最新版本
[oracle@DB usr2]$ id
uid=500(oracle) gid=500(oinstall) 组=500(oinstall),501(dba) 环境=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[oracle@DB usr2]$ cd
/opt/app/oracle/product/11.2.0/dbhome_1/OPatch/
[oracle@DB OPatch]$ ./opatch version
OPatch Version: 11.2.0.3.4
OPatch succeeded.
[oracle@DB OPatch]$ cd ..
[oracle@DB dbhome_1]$ mv OPatch/ OPatch_bak
[oracle@DB dbhome_1]$ unzip
/usr2/p6880880_112000_Linux-x86-64.zip
Archive:
/usr2/p6880880_112000_Linux-x86-64.zip
creating:
OPatch/
creating:
OPatch/jlib/
…
inflating:
OPatch/opatchdiag
[oracle@DB dbhome_1]$ cd
OPatch
[oracle@DB OPatch]$ ./opatch version
OPatch Version: 11.2.0.3.6
OPatch succeeded.
2.数据库软件应用19121551补丁程序
[oracle@DB usr2]$ cd
/opt/app
[oracle@DB app]$ mkdir patch
[oracle@DB app]$ cd patch/
[oracle@DB patch]$ unzip /usr2/p19121551_112040_Linux-x86-64.zip
Archive:
/usr2/p19121551_112040_Linux-x86-64.zip
creating:
19121551/
inflating:
PatchSearch.xml
[oracle@DB patch]$ ls
19121551 PatchSearch.xml
[oracle@DB patch]$ ls -lh
总用量 40K
drwxr-xr-x. 6 oracle oinstall 4.0K 10月 10 21:20 19121551
-rw-rw-r--. 1 oracle oinstall 36K 10月 15 02:43 PatchSearch.xml
[oracle@DB patch]$ cd 19121551/
[oracle@DB 19121551]$ ls
17478514 18031668 18522509 19121551 patchmd.xml README.html README.txt
[oracle@DB 19121551]$ pwd
/opt/app/patch/19121551
[oracle@DB 19121551]$
/opt/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail
-ph ./
Oracle 中间补丁程序安装程序版本 11.2.0.3.6
版权所有 (c) 2013, Oracle Corporation。保留所有权利。
PREREQ session
Oracle Home :
/opt/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /opt/app/oraInventory
from
: /opt/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 : /opt/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2014-12-04_21-48-36下午_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
[oracle@DB 19121551]$ sqlplus / as sysdba
SQL> !lsnrctl stop
SQL> shutdown immediate
SQL> exit
[oracle@DB 19121551]$ ls
17478514 18031668 18522509 19121551 patchmd.xml README.html README.txt
[oracle@DB 19121551]$ /opt/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch apply
Oracle 中间补丁程序安装程序版本 11.2.0.3.6
版权所有 (c) 2013, Oracle Corporation。保留所有权利。
Oracle Home :
/opt/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /opt/app/oraInventory
from
: /opt/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 : /opt/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2014-12-04_21-32-34下午_1.log
Verifying environment and performing prerequisite checks...
Prerequisite check "CheckActiveFilesAndExecutables" failed.
The details are:
Following
executables are active :
/opt/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1
UtilSession 失败:
Prerequisite check "CheckActiveFilesAndExecutables" failed.
Log file location: /opt/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2014-12-04_21-32-34下午_1.log
OPatch failed with error code 73
[oracle@DB 19121551]$
/opt/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch lspatches
此 Oracle 主目录中未安装任何中间补丁程序。
[oracle@DB 19121551]$ ps -ef|grep ora
oracle 41194 41165 0 17:49 pts/1 00:00:00 sqlplus as sysdba
[oracle@DB 19121551]$ kill -9 41194
[oracle@DB 19121551]$
/opt/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch apply
Oracle 中间补丁程序安装程序版本 11.2.0.3.6
版权所有 (c) 2013, Oracle Corporation。保留所有权利。
Oracle Home :
/opt/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /opt/app/oraInventory
from
: /opt/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 : /opt/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2014-12-04_21-53-20下午_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 17478514 18031668 18522509 19121551
是否继续? [y|n]
y
User Responded with:
Y
All checks passed.
提供电子邮件地址以用于接收有关安全问题的通知, 安装 Oracle Configuration Manager 并启动它。如果您使用 My Oracle
Support 电子邮件地址/用户名, 操作将更简单。
有关详细信息, 请访问 http://www.oracle.com/support/policies.html。
电子邮件地址/用户名: 回车
尚未提供电子邮件地址以接收有关安全问题的通知。
是否不希望收到有关安全问题
(是 [Y], 否 [N]) [N] 的通知: y
请关闭本地系统上在此 ORACLE_HOME 之外运行的 Oracle 实例。
(Oracle 主目录 = '/opt/app/oracle/product/11.2.0/dbhome_1')
本地系统是否已准备打补丁? [y|n]
y
User Responded with: Y
Backing up files...
Applying sub-patch '17478514' to OH '/opt/app/oracle/product/11.2.0/dbhome_1'
正在为组件 oracle.rdbms, 11.2.0.4.0 打补丁...
…
Verifying the update...
Composite patch 19121551 successfully
applied.
Log file location: /opt/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2014-12-04_21-53-20下午_1.log
OPatch succeeded.
3.数据库打补丁
[oracle@DB 19121551]$ cd /opt/app/oracle/product/11.2.0/dbhome_1/rdbms/admin/
[oracle@DB admin]$ sqlplus /nolog
SQL> conn /as sysdba
SQL> startup
SQL> @catbundle.sql
psu apply
4.验证PSU补丁是否应用成功
[oracle@DB OPatch]$ ./opatch lspatches
19121551;Database Patch Set Update : 11.2.0.4.4 (19121551)
[oracle@DB OPatch]$ ./opatch lsinventory
Oracle 中间补丁程序安装程序版本 11.2.0.3.6
版权所有 (c) 2013, Oracle Corporation。保留所有权利。
Oracle Home :
/opt/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /opt/app/oraInventory
from
: /opt/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 : /opt/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2014-12-04_22-26-01下午_1.log
Lsinventory Output file location : /opt/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory2014-12-04_22-26-01下午.txt
--------------------------------------------------------------------------------
已安装的顶级产品 (1):
Oracle Database 11g
11.2.0.4.0
此 Oracle 主目录中已安装 1 个产品。
中间补丁程序 (1) :
Patch 19121551
: applied on Thu Dec 04 21:54:53 CST 2014
Unique Patch ID: 17949166
Patch description: "Database Patch Set Update
: 11.2.0.4.4 (19121551)"
Created on 6 Oct 2014, 10:07:57 hrs PST8PDT
Sub-patch 18522509; "Database
Patch Set Update : 11.2.0.4.3 (18522509)"
。。
17346671, 18996843, 14852021, 17783588, 16618694, 17672719, 17546761
--------------------------------------------------------------------------------
OPatch succeeded.
sqlplus "/ as sysdba"
SQL> select * from dba_registry_history;
ACTION_TIME
ACTION
NAMESPACE
VERSION
ID BUNDLE_SERIES
COMMENTS
------------------------------ -------------------- ---------- ----------
---------- --------------- ----------------------------------------
2013-08-24 12:03:45.119862 APPLY
SERVER 11.2.0.4
0 PSU
Patchset 11.2.0.2.0
2014-12-04 17:48:29.485704 APPLY
SERVER 11.2.0.4
0 PSU
Patchset 11.2.0.2.0
2014-12-04 21:57:50.086900 APPLY
SERVER 11.2.0.4
4 PSU
PSU 11.2.0.4.4