检查当前数据库CPU和PSU补丁信息

方法一:

登录数据库,检查DBA_REGISTRY_HIST视图。

SYS@orcl> 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

2015-07-24 17:37:04.622489     APPLY                               SERVER         11.2.0.4      0 PSU

Patchset 11.2.0.2.0

方法二:

通过opatch lsinventory方式。

$ /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch lsinventory

查看opatch版本信息

[oracle@OCP ~]$ /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch version

OPatch Version: 11.2.0.3.4

OPatch succeeded.

升级前关闭数据库和监听。

上传PSU11.2.0.4.5补丁包并解压

本例是将补丁包复制到/u01/app/oracle/patchPakge下

用unzip进行解压

[oracle@OCP patchPakge]$ unzip p19769489_112040_Linux-x86-64.zip

进入解压目录进行安装

安装补丁

[oracle@OCP patchPakge]$ cd 19769489/

[oracle@OCP 19769489]$ /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch apply

Oracle Interim Patch Installer version 11.2.0.3.4

Copyright (c) 2012, Oracle Corporation.  All rights reserved.

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.4

OUI version       : 11.2.0.4.0

Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2015-07-24_20-08-16PM_1.log

Verifying environment and performing prerequisite checks...

Prerequisite check "CheckMinimumOPatchVersion" failed.

The details are:

The OPatch being used has version 11.2.0.3.4 while the following patch(es) require higher versions:

Patch 17478514 requires OPatch version 11.2.0.3.5.

Patch 18031668 requires OPatch version 11.2.0.3.5.

Patch 18522509 requires OPatch version 11.2.0.3.5.

Patch 19121551 requires OPatch version 11.2.0.3.5.

Patch 19769489 requires OPatch version 11.2.0.3.5.

Please download latest OPatch from My Oracle Support.

UtilSession failed: Prerequisite check "CheckMinimumOPatchVersion" failed.

Log file location: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2015-07-24_20-08-16PM_1.log

OPatch failed with error code 73

2、OPatch应用报错,检查日志

[oracle@OCP19769489]$cat u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2015-07-24_20-08-16PM_1.log

[Jul 24, 2015 8:08:26 PM]    Prerequisite check "CheckMinimumOPatchVersion" failed.

The details are:

[Jul 24, 2015 8:08:26 PM]    OUI-67073:UtilSession failed: Prerequisite check "CheckMinimumOPatchVersion" failed.

[Jul 24, 2015 8:08:26 PM]    Stack Description: java.lang.RuntimeException: Prerequisite check "CheckMinimumOPatchVersion" failed.

显示opatch版本有问题,先更新opatch版本。

下载p6880880,并解压缩

[oracle@OCP patchPakge]$ unzip p6880880_112000_Linux-x86-64.zip

[oracle@OCP patchPakge]$ rm -rf /u01/app/oracle/product/11.2.0/db_1/OPatch

[oracle@OCP patchPakge]$  cp -r OPatch/ /u01/app/oracle/product/11.2.0/db_1/

[oracle@OCP patchPakge]$  /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch version

OPatch Version: 11.2.0.3.6

OPatch succeeded.

更新成功。

通过新版本Opatch安装PSU

[oracle@OCP 19769489]$ /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch apply

Oracle Interim Patch Installer version 11.2.0.3.6

Copyright (c) 2013, Oracle Corporation.  All rights reserved.

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/opatch2015-07-24_20-23-44PM_1.log

Verifying environment and performing prerequisite checks...

Prerequisite check "CheckActiveFilesAndExecutables" failed.

The details are:

Following executables are active :

/u01/app/oracle/product/11.2.0/db_1/bin/oracle

/u01/app/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1

UtilSession failed: Prerequisite check "CheckActiveFilesAndExecutables" failed.

Log file location: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2015-07-24_20-23-44PM_1.log

OPatch failed with error code 73

通过报错提示“Check Active Files And Executables”可能是有些执行程序用到了/u01/app/oracle/product/11.2.0/db_1/lib/目录下的库文件libclntsh.so.11.1和/u01/app/oracle/product/11.2.0/db_1/bin/下的oracle。

用fuser查看是谁在用这些文件并kill这些进程。

[oracle@OCP 19769489]$ fuser /u01/app/oracle/product/11.2.0/db_1/bin/oracle

/u01/app/oracle/product/11.2.0/db_1/bin/oracle:  3221e

[oracle@OCP 19769489]$ fuser /u01/app/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1

/u01/app/oracle/product/11.2.0/db_1/lib/libclntsh.so.11.1:  3174m

[oracle@OCP 19769489]$ kill -9 3221 3174

重新执行安装opatch

[oracle@OCP 19769489]$ /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch apply

Oracle Interim Patch Installer version 11.2.0.3.6

Copyright (c) 2013, Oracle Corporation.  All rights reserved.

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/opatch2015-07-24_20-30-44PM_1.log

Verifying environment and performing prerequisite checks...

OPatch continues with these patches:   17478514  18031668  18522509  19121551  19769489

Do you want to proceed? [y|n]

y

User Responded with: Y

All checks passed.

…………………….

Composite patch 19769489 successfully applied.

OPatch Session completed with warnings.

Log file location: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2015-07-24_20-30-44PM_1.log

OPatch completed with warnings.

检查Opatch是否已经完成

[oracle@OCP 19769489]$ /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch lsinventory

Oracle Interim Patch Installer version 11.2.0.3.6

Copyright (c) 2013, Oracle Corporation.  All rights reserved.

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/opatch2015-07-24_20-40-00PM_1.log

Lsinventory Output file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2015-07-24_20-40-00PM.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 (1) :

Patch  19769489     : applied on Fri Jul 24 20:36:26 CST 2015

Unique Patch ID:  18236413

Patch description:  "Database Patch Set Update : 11.2.0.4.5 (19769489)"

Created on 28 Dec 2014, 21:22:44 hrs PST8PDT

Sub-patch  19121551; "Database Patch Set Update : 11.2.0.4.4 (19121551)"

Sub-patch  18522509; "Database Patch Set Update : 11.2.0.4.3 (18522509)"

Sub-patch  18031668; "Database Patch Set Update : 11.2.0.4.2 (18031668)"

Sub-patch  17478514; "Database Patch Set Update : 11.2.0.4.1 (17478514)"

Bugs fixed:

17288409, 18273830, 17811429, 17205719, 19972566, 17922254, 17754782

17726838, 16934803, 13364795, 17311728, 17441661, 17284817, 13645875

16992075, 18199537, 16542886, 17446237, 14565184, 19972569, 17071721

17610798, 17449815, 17375354, 17397545, 19463897, 18230522, 13866822

16360112, 17982555, 17235750, 19769489, 17478514, 12905058, 18235390

14338435, 13944971, 18641451, 20142975, 16929165, 12747740, 17546973

14054676, 17088068, 18264060, 17042658, 17343514, 17016369, 14602788

19972568, 19680952, 18471685, 18508861, 14657740, 17332800, 19211724

13951456, 16315398, 19972564, 18744139, 17186905, 16850630, 18315328

17437634, 19049453, 18673304, 17883081, 19006849, 18641419, 17296856

18674024, 18262334, 17006183, 18277454, 16833527, 17232014, 16855292

10136473, 17705023, 17865671, 18554871, 19121551, 18334586, 19854503

19309466, 17551709, 17588480, 19827973, 17842825, 17344412, 18828868

18681862, 18554763, 17390160, 17025461, 13955826, 11883252, 13609098

18139690, 17501491, 17239687, 17299889, 17752121, 17602269, 19197175

18673325, 17313525, 18293054, 17242746, 19544839, 18964939, 17600719

18191164, 17571306, 18482502, 19466309, 17951233, 18094246, 19615136

17165204, 17011832, 17040527, 18098207, 16785708, 17477958, 17174582

16180763, 17465741, 16777840, 18522509, 17323222, 19463893, 16595641

12816846, 16875449, 16524926, 17237521, 18228645, 18282562, 17596908

17811438, 17811447, 18031668, 17184721, 16494615, 16912439, 18061914

17282229, 17545847, 18202441, 17082359, 19554106, 17614134, 13558557

17341326, 14034426, 17891946, 18339044, 19458377, 17716305, 17752995

16392068, 19271443, 17891943, 18092127, 17258090, 17767676, 17614227

17040764, 14106803, 17381384, 15913355, 18973907, 18356166, 18673342

14084247, 17389192, 17612828, 17006570, 13853126, 17721717, 17570240

18203837, 17390431, 14245531, 16043574, 16863422, 19727057, 17468141

17786518, 17912217, 16422541, 19972570, 17037130, 17267114, 18244962

18203838, 16198143, 16956380, 17478145, 14829250, 17394950, 18189036

18641461, 17835627, 17027426, 16268425, 18247991, 14458214, 19584068

18436307, 17265217, 13498382, 16692232, 17786278, 17227277, 16042673

16314254, 17443671, 16228604, 16837842, 17571039, 17393683, 16344544

17787259, 18009564, 20074391, 14354737, 15861775, 18135678, 18614015

16399083, 18018515, 17835048, 16472716, 17936109, 17050888, 17325413

14010183, 18747196, 17036973, 16613964, 17080436, 17761775, 16721594

18280813, 17302277, 16901385, 15979965, 15990359, 18203835, 17297939

17811456, 16731148, 17215560, 14133975, 17385178, 17586955, 18441944

16450169, 17655634, 9756271, 19730508, 17892268, 17648596, 16220077

16069901, 11733603, 16285691, 17587063, 16538760, 18180390, 17393915

17274537, 18096714, 17308789, 17238511, 18436647, 17824637, 14285317

19289642, 14764829, 18328509, 17622427, 16943711, 18306996, 17346671

18996843, 14852021, 17783588, 16618694, 18674047, 17672719, 12364061

17851160, 17546761

--------------------------------------------------------------------------------

OPatch succeeded.

结果显示安装成功。

更新dba_registry_history视图为最新PSU信息

SQL>startup

SQL> !lsnrctl start

SQL> alter system register;

SQL> @?/rdbms/admin/catbundle.sql psu apply

查看更新后的视图信息

SYS@orcl> 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

2015-07-24 17:37:04.622489     APPLY  SERVER     11.2.0.4            0 PSU             Patchset 11.2.0.2.0

2015-07-24 20:52:13.592073     APPLY  SERVER     11.2.0.4            5 PSU             PSU 11.2.0.4.5

3 rows selected.

SYS@orcl> select action,comments from registry$history;

ACTION COMMENTS

------ -------------------------

APPLY  Patchset 11.2.0.2.0

APPLY  Patchset 11.2.0.2.0

APPLY  PSU 11.2.0.4.5

3 rows selected

显示安装成功,成功从11.2.0.2.0升级到11.2.0.4.5

oracle11g安装补丁升级的更多相关文章

  1. WAS7.0安装补丁升级程序无法替换文件 java/docs/autorun.inf解决办法

    OS:Win7 64bit WAS版本:WASND_7.0_Windows_x64_C1G2JML.zip WAS补丁升级程序版本:7.0.0.13-WS-UPDI-WinAMD64 异常信息: Ca ...

  2. 【转】:Oracle Linux6.9下安装Oracle 11.2.0.4.0及psu补丁升级

    为方便截图,本文操作都在vmware虚拟机上完成. 目录: 1.操作系统安装 2.数据库安装 3.PSU补丁升级卸载   part1 操作系统安装 Oracle (Enterprise) Linux ...

  3. oracle 11g RAC 补丁升级方法

    一.自动升级方法 使用auto方式在两节点分别进行PSU的安装,安装PSU前注意更新opatch工具至PSU所要求版本,p22191577补丁包括GI和DB,分别执行即可. 两节点分别grid用户执行 ...

  4. oracle补丁升级

    PSU的全称是Patch Set Update,Oracle对于其产品每个季度发行一次的补丁包,包含了bug的修复.Oracle选取被用户下载数量多,且被验证过具有较低风险的补丁放入到每个季度的PSU ...

  5. Oracle安装11.2.0.4.180116补丁及如何检查数据库安装补丁

    最近做了一个安装11.2.0.4.180116补丁的实验,突然想起之前和同事讨论的一个问题:如何检查数据库安装补丁的版本,之前搜到的是去查dba_registry_history,有的说在操作系统中执 ...

  6. weblogic补丁下载与安装补丁的方法

    文章目录1.根据漏洞报告下载补丁2.补丁包上传解压到Linux3.关于OPatch4.安装补丁4.1单个补丁安装4.2查看已安装的补丁4.3多个补丁安装4.4单个补丁回滚4.5多个补丁回滚4.6验证补 ...

  7. Confluence 6 安装补丁类文件

    Atlassian 支持或者 Atlassian 缺陷修复小组可能针对有一些关键问题会提供补丁来解决这些问题,但是这些问题还没有放到下一个更新版本中.这些问题将会使用 Class 类文件同时在官方 J ...

  8. Hi3536DV100 SDK 安装以及升级使用说明

    第一章 Hi3536DV100_SDK_Vx.x.x.x版本升级操作说明 如果您是首次安装本SDK,请直接参看第2章. 第二章 首次安装SDK1.Hi3536DV100 SDK包位置 在"H ...

  9. Weblogic补丁升级操作手冊

    1.查看Weblogic版本号 方法一 [weblogic@Weblogic201 ~]$ cd /home/weblogic/Oracle/Middleware/wlserver_10.3/serv ...

随机推荐

  1. Go语言中byte类型和rune类型(五)

    本篇内容本来准备在上一篇写的,想了想还是拆开写. go语言中字符串需要使用用双引号,而单引号用来表示单个的字符,字符也是组成字符串的元素.go语言的字符有两种: uint8类型,或者叫 byte 型, ...

  2. Python基础数据类型str字符串

    3.3字符串str ' ' 0 切片选取 [x:y] 左闭右开区间 [x:y:z] 选取x到y之间 每隔z选取一次(选取x,x+z,....) z为正 索引位置:x在y的左边 z为负 索引位置:x在y ...

  3. Ubantu 手动设置DSL连接

    参考链接:https://m.linuxidc.com/Linux/2015-07/119774.htm

  4. 运维ipvsadm配置负载均衡

    一.负载均衡LVS基本介绍 LB集群的架构和原理很简单,就是当用户的请求过来时,会直接分发到Director Server上,然后它把用户的请求根据设置好的调度算法,智能均衡地分发到后端真正服务器(r ...

  5. 在mybatis中,在列表分页查询过程中造成集合属性数据丢失的问题

    由于在进行多表关联分页查询时,某一个集合属性的多条数据正好位于2页的分割处,那么就会造成在前一页获取到的该集合属性的集合内部数据不全,因为其余数据被分到了第二页, 因此建议在进行集合属性的封装时,最好 ...

  6. ros基础知识总结

    参考于:ros官网教程 实验楼:ros机器人操作系统自主学习实验 基础知识 1 一个catkin程序包由什么组成? 一个程序包要想称为catkin程序包必须符合以下要求: 该程序包必须包含catkin ...

  7. Vue示例教程

    <!DOCTYPE html> <html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml&q ...

  8. 关于Pandas中Dataframe的操作(一)

    1.如何实现两个dataframe去重()? 假设df1是所有的数据,现在想去除与df2中重复的数据,也就是实现对df1进行操作,让他的数据不再包括df2. 方法一:先把需要剔除的df2的某一列(如i ...

  9. faiss的简单使用

    简介 faiss是为稠密向量提供高效相似度搜索和聚类的框架.由Facebook AI Research研发. 具有以下特性. 1.提供多种检索方法 2.速度快 3.可存在内存和磁盘中 4.C++实现, ...

  10. 浅谈java虚拟机|系列1|架构简介

    今天开了一个专题.谈谈我们java程序员每天面对的java虚拟机(jvm). 本质上来说,jvm分两部分:编译器(compiler)和运行时(runtime). 所谓的编译器,简单来说,他就是个翻译机 ...