ORACLE 版本
$ sqlplus / as sysdba
SQL> select * from v$instance;
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
查看已有补丁
$ /data/oracle/product/11.2.0/db_1/OPatch/opatch lsinv
该版本最新补丁,需要下载
p12419378_112010_Linux-x86-64-DATABASE PSU 11.2.0.1.6 (INCLUDES CPUJUL2011) (Patch).zip
OPatch版本
# 需要下载
p6880880_112000_Linux-x86-64.zip
# 先升级OPatch版本
# root 用户
$ unzip p6880880_112000_Linux-x86-64.zip
$ chown oracle:oinstall -R ./OPatch
#备份
$ mv /data/oracle/product/11.2.0/db_1/OPatch /data/oracle/product/11.2.0/db_1/OPatch_old
#升级
mv ./OPatch /data/oracle/product/11.2.0/db_1/
开始打补丁,要先关闭数据库
# root 用户
$ unzip p12419378_112010_Linux-x86-64-DATABASE PSU 11.2.0.1.6 (INCLUDES CPUJUL2011) (Patch).zip
$ chown oracle:oinstall -R ./12419378
# oracle 用户
$ sqlplus / as sysdba
SQL > shutdown immediate;
$ lsnrctl stop
$ cd 12419378
# 打补丁升级
$ /data/oracle/product/11.2.0/db_1/OPatch/opatch apply
# 升级完查看补丁
$ /data/oracle/product/11.2.0/db_1/OPatch/opatch lsinv