首先,进行PSU,首要的事情就是认真的看readme.html,从里面我们可以知道很详细的升级步骤已经回退的方案。并且避免了很多的坑
在进行PSU之前,要首先确认你准备升级的版本以及你自己系统
数据库的版本,就像我们这次,是从11.2.0.4.0升级到11.2.0.4.2版本,从MOS上去找到相应的PATCH
p18031668_112040_Linux-x86-64.zip
可以通过p后面的数字在mos上面很容易的查到该补丁包,从该版本的补丁包的readme.html 中。我们可以看到这样要求
2.1 OPatch Utility
You must use the OPatch utility version 11.2.0.3.6 or later to apply this patch. Oracle recommends that you use the latest released OPatch version for 11.2, which is available for download from My Oracle Support patch 6880880 by selecting the 11.2.0.0.0 release.
由于我们是用的系统盘直接装的,默认的版本是这个:
[oracle@storedb OPatch]$ ./opatch version
OPatch Version: 11.2.0.3.4
版本是11.2.0.3.4 够不到PATCH的最低的安装版本,所以我们需要一个另外的PATCH来更新opatch的版本
Oracle 提供了这样的一个补丁包
p6880880_112000_
Linux-x86-64.zip
用来把OPATCH提成到最新的版本
具体的单独升级ORACLE PSU的步骤:
1.把Opatch的环境变量配置
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
2.查看数据库的版本
opatch version
[oracle@storedb OPatch]$ opatch version
OPatch Version: 11.2.0.3.4
OPatch succeeded.
opatch lsinventory
[oracle@kadora4 OPatch]$ opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /opt/app/oracle/product/11.2.0/db_1
Central Inventory : /opt/oraInventory
from : /opt/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version : 11.2.0.3.4
OUI version : 11.2.0.4.0
Log file location : /opt/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2014-07-07_10-44-39AM_1.log
Lsinventory Output file location : /opt/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2014-07-07_10-44-39AM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.4.0
There are 1 products installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.
--------------------------------------------------------------------------------
3.更新补丁工具包
cd $ORACLE_HOME/
mv OPatch OPath_bak
unzip p6880880_112000_LINUX.zip
cd OPatch
[oracle@racdb1 db_1]$ cd OPatch
[oracle@racdb1 OPatch]$ ls
crs docs emdpatch.pl jlib ocm opatch opatch.bat opatchdiag opatchdiag.bat opatch.ini opatch.pl opatchprereqs oplan README.txt version.txt
[oracle@racdb1 OPatch]$
[oracle@racdb1 OPatch]$ opatch version
OPatch Version: 11.2.0.3.6
OPatch succeeded.
4.检查你需要打的补丁是否与现有的补丁有冲突
unzip p18031668_112040_Linux-x86-64.zip
cd 18031668
[oracle@racdb1 18031668]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version : 11.2.0.3.6
OUI version : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2014-07-09_01-59-50AM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
5.关闭数据库并更新最新的补丁
sqlplus / as sysdba
shutdown immediate
cd 18031668
opatch apply
opatch apply
Oracle Interim Patch Installer ver