当前位置:  数据库>oracle

Oracle 11g升级PSU详细步骤

    来源: 互联网  发布时间:2017-06-16

    本文导语: Oracle 每个季度都会发布最新的补丁。对于生产运维人员来说,定期升级系统、打补丁是日常工作中不可缺少的部分。  相对于过去的版本,Oracle打补丁的方式已经变得比较简单,处理PSU的方法也发生了一些变化。在11g中,对于...

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 Oracle 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 performing 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 performing 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]$  /sbin/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 http://www.oracle.com/support/policies.html 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.


    
 
 

您可能感兴趣的文章:

  • 请问:谁在linux下安装过oracle?详细安装步骤共享一下吧!我有急用。谢谢了!
  • 有人在fedora 10下安装 oracle database 11g,没有呀?提供个安装步骤
  • 上传一个非常详细的Oracle10G在IBMAIX 5L上的安装步骤与大家分享
  • Oracle移动数据文件到新分区步骤分析
  • oracle 创建表空间步骤代码
  • 使用X manager连接oracle数据库的步骤
  • oracle定时备份压缩的实现步骤
  • Linux/UNIX下,C++程序通过那些步骤访问Oracle或者Sybase SQL数据库?
  • oracle scott 解锁步骤
  • oracle单库彻底删除干净的执行步骤
  • oracle SQL解析步骤小结
  • 在oracle数据库里创建自增ID字段的步骤
  • oracle停止数据库后linux完全卸载oracle的详细步骤
  • Oracle与FoxPro两数据库的数据转换步骤
  • oracle 10g 精简版安装步骤分享
  • Oracle数据库的十种重新启动步骤
  • Oracle回滚段空间回收步骤
  • 如何升级Oracle 9i到10g iis7站长之家
  • 安装Linux与Oracle数据库步骤精讲
  • Oracle 10g表空间创建的完整步骤
  • 如何升级Oracle 9i到10g
  • Oracle发布Oracle VM 2.2升级虚拟化平台
  • Oracle数据库在Linux AS4升级
  • Oracle10201 RAC升级到10204后导出数据时报EXP-00056错误
  • Oracle RAC 10.2.0.1升级到10.2.0.4
  • VMware中linux环境下oracle安装图文教程(二)ORACLE 10.2.05版本的升级补丁安装
  • oracle9204升级到9206笔记
  • Linux下升级Oracle 10
  • 2008年Oracle错误、备份、升级等最热门问题
  • Oracle 10201 RAC升级到10204
  • 将Oracle表空间升级为本地托管模式
  •  
    本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
    本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • oracle 11g最新版官方下载地址
  • Oracle EBS R12 支持 Oracle Database 11g
  • Oracle 10g和Oracle 11g网格技术介绍
  • Linux版本的Oracle 11g将首先被发布
  • 关于Linux下oracle是10g?还是11g?
  • Oracle 11g 相关工具netca,dbca乱码之解决
  • fedora10安装oracle11g提示物理内存不足怎么办?
  • Oracle 11g解锁scott
  • Oracle 11g R2 数据库将在9月发布
  • Oracle内存数据库11g和高速缓存11g上市
  • 在ubuntu10.04上安装oracle11g失败
  • 关于Oracle 11g 闪回的一个小问题
  • Oracle11g备份和恢复功能的提高
  • linux redhat5.6安装oracle11g在自动创建实例时停住不动,有图
  • Oracle针对Eclipse 11g发布开发包
  • centos5.4安装oracle11g的问题
  • Oracle 11g 数据库 Alert日志的新发展
  • Redhat 6 安装 oracle 11g2的问题
  • 基于Linux环境的Oracle 11g数据库正式推出
  • Oracle 11G密码180天过期后的修改方法
  • 11g Oracle导出表不导出数据默认为空表的解决方法
  • Oracle 12c发布简单介绍及官方下载地址
  • 在linux下安装oracle,如何设置让oracle自动启动!也就是让oracle那个服务自动启动,不是手动的
  • Oracle 数据库(oracle Database)Select 多表关联查询方式
  • 请问su oracle 和su - oracle有什么不同?
  • Oracle数据库(Oracle Database)体系结构及基本组成介绍
  • 虚拟机装Oracle R12与Oracle10g
  • 如何设置让Oracle SQL Developer显示的时间包含时分秒
  • Oracle 数据库开发工具 Oracle SQL Developer
  • oracle中如何把表中具有相同值列的多行数据合并成一行
  • SCO unix下安装oracle,但没有光盘,请大家推荐一个oracle下载站点(unix版本的)。谢谢!!!!


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,,E-mail:www_#163.com(请将#改为@)

    浙ICP备11055608号-3