Windows环境下给oracle打补丁详细教程

2023-05-16

环境检查

1、检查oracle数据库版本,安装前检查:确保Oracle数据库安装与您正在应用此修补程序的版本相同。

C:\WINDOWS\system32>sqlplus -v
SQL*Plus: Release 11.2.0.1.0 Production

2、OPatch工具检查
OPatch工具包,在安装目录$ORACLE_HOME下,PSU安装升级,都是通过OPatch来完成的。PSU的升级安装对OPatch的版本有一定的要求,关于这一点,可以查看PSU的Readme文档。例如,要安装p21352635_112040_Linux-x86-64,则必须要11.2.0.3.6或更高版本的OPatch。确定当前系统的OPatch版本
先配置oracle环境变量
在这里插入图片描述
在这里插入图片描述
检查opatch版本

C:\WINDOWS\system32>opatch version
Invoking OPatch 11.1.0.6.6
OPatch Version: 11.1.0.6.6
OPatch succeeded.

检测当前数据补丁安装情况。

C:\WINDOWS\system32>opatch lsinventory
Invoking OPatch 11.1.0.6.6
Oracle 中间补丁程序安装程序版本 11.1.0.6.6
版权所有 (c) 2009, Oracle Corporation。保留所有权利。
Oracle 主目录       : F:\app\mr_fan\product\11.2.0\dbhome_1
主产品清单: C:\Program Files\Oracle\Inventory
   从           : n/a
OPatch 版本    : 11.1.0.6.6
OUI 版本       : 11.2.0.1.0
OUI 位置      : F:\app\mr_fan\product\11.2.0\dbhome_1\oui
日志文件位置 : F:\app\mr_fan\product\11.2.0\dbhome_1\cfgtoollogs\opatch\opatch2020-03-15_17-44-54下午.log
Patch history file: F:\app\mr_fan\product\11.2.0\dbhome_1\cfgtoollogs\opatch\opatch_history.txt
Lsinventory Output file location : F:\app\mr_fan\product\11.2.0\dbhome_1\cfgtoollogs\opatch\lsinv\lsinventory2020-03-15_17-44-54下午.txt
--------------------------------------------------------------------------------
已安装的顶级产品 (1):

Oracle Database 11g                                                  11.2.0.1.0
此 Oracle 主目录中已安装 1 个产品。
此 Oracle 主目录中未安装任何中间补丁程序。
--------------------------------------------------------------------------------

请用管理员权限运行如下命令,否则可能报错

产品清单加载失败... OPatch cannot load inventory for the given Oracle Home.
LsInventorySession 失败: LsInventory cannot create the log directory F:\app\mr_fan\product\11.2.0\dbhome_1\cfgtoollogs\opatch\lsinv\lsinventory2020-03-15_17-44-20下午.txt
java.lang.RuntimeException: LsInventory cannot create the log directory F:\app\mr_fan\product\11.2.0\dbhome_1\cfgtoollogs\opatch\lsinv\lsinventory2020-03-15_17-44-20下午.txt
        at oracle.opatch.LsInventorySession.init(LsInventorySession.java:220)
        at oracle.opatch.LsInventorySession.loadAndPrintInventory(LsInventorySession.java:376)
        at oracle.opatch.LsInventorySession.process(LsInventorySession.java:327)
        at oracle.opatch.OPatchSession.main(OPatchSession.java:1579)
        at oracle.opatch.OPatch.main(OPatch.java:630)
OPatch failed with error code = 73

3、关闭数据库相关的所有服务
在这里插入图片描述
4、将下载的补丁进行解压,并在补丁根目录下执行 opatch apply命令进行补丁安装。

C:\WINDOWS\system32>e:

E:\>cd E:\13423278

E:\13423278>opatch apply

Invoking OPatch 11.1.0.6.6
Oracle 中间补丁程序安装程序版本 11.1.0.6.6
版权所有 (c) 2009, Oracle Corporation。保留所有权利。
Oracle 主目录       : F:\app\mr_fan\product\11.2.0\dbhome_1
主产品清单: C:\Program Files\Oracle\Inventory
   从           : n/a
OPatch 版本    : 11.1.0.6.6
OUI 版本       : 11.2.0.1.0
OUI 位置      : F:\app\mr_fan\product\11.2.0\dbhome_1\oui
日志文件位置 : F:\app\mr_fan\product\11.2.0\dbhome_1\cfgtoollogs\opatch\opatch2020-03-15_17-53-23下午.log
Patch history file: F:\app\mr_fan\product\11.2.0\dbhome_1\cfgtoollogs\opatch\opatch_history.txt
ApplySession 将中间补丁程序 '13423278' 应用到 OH 'F:\app\mr_fan\product\11.2.0\dbhome_1'
Running prerequisite checks...
Prerequisite check "CheckActiveFilesAndExecutables" failed.
The details are:
Following files are active :
F:\app\mr_fan\product\11.2.0\dbhome_1\bin\orageneric11.dll
F:\app\mr_fan\product\11.2.0\dbhome_1\bin\oraclient11.dll
F:\app\mr_fan\product\11.2.0\dbhome_1\bin\orapls11.dll
F:\app\mr_fan\product\11.2.0\dbhome_1\bin\oracommon11.dll
F:\app\mr_fan\product\11.2.0\dbhome_1\bin\oraxml11.dll
F:\app\mr_fan\product\11.2.0\dbhome_1\bin\oranhost11.dll
F:\app\mr_fan\product\11.2.0\dbhome_1\bin\oran11.dll
F:\app\mr_fan\product\11.2.0\dbhome_1\bin\oranro11.dll
F:\app\mr_fan\product\11.2.0\dbhome_1\bin\orantcp11.dll
F:\app\mr_fan\product\11.2.0\dbhome_1\bin\orazt11.dll
F:\app\mr_fan\product\11.2.0\dbhome_1\bin\orahasgen11.dll
F:\app\mr_fan\product\11.2.0\dbhome_1\bin\oci.dll
F:\app\mr_fan\product\11.2.0\dbhome_1\bin\orasql11.dll
F:\app\mr_fan\product\11.2.0\dbhome_1\bin\oraldapclnt11.dll
F:\app\mr_fan\product\11.2.0\dbhome_1\bin\oraztkg11.dll
F:\app\mr_fan\product\11.2.0\dbhome_1\bin\orannzsbb11.dll
F:\app\mr_fan\product\11.2.0\dbhome_1\bin\orasnls11.dll
在先决条件检查期间 ApplySession 失败: Prerequisite check "CheckActiveFilesAndExecutables" failed.
系统无任何变化, OPatch 不会尝试还原系统
OPatch failed with error code = 74

执行过程中可能会出现如下错误,此时有些进程正在占用如上文件
可执行 Tasklist /name xxx.dll命令查询哪些进程在占用,关闭相关进程

E:\13423278>Tasklist /m orageneric11.dll
映像名称                       PID 模块
========================= ======== ============================================
emagent.exe                  10020 orageneric11.dll
E:\13423278>

结束进程
在这里插入图片描述
再次执行打补丁命令

e:\13423278>opatch apply
Invoking OPatch 11.1.0.6.6
Oracle 中间补丁程序安装程序版本 11.1.0.6.6
版权所有 (c) 2009, Oracle Corporation。保留所有权利。
Oracle 主目录       : F:\app\mr_fan\product\11.2.0\dbhome_1
主产品清单: C:\Program Files\Oracle\Inventory
   从           : n/a
OPatch 版本    : 11.1.0.6.6
OUI 版本       : 11.2.0.1.0
OUI 位置      : F:\app\mr_fan\product\11.2.0\dbhome_1\oui
日志文件位置 : F:\app\mr_fan\product\11.2.0\dbhome_1\cfgtoollogs\opatch\opatch2020-03-15_18-24-31下午.log
Patch history file: F:\app\mr_fan\product\11.2.0\dbhome_1\cfgtoollogs\opatch\opatch_history.txt
ApplySession 将中间补丁程序 '13423278' 应用到 OH 'F:\app\mr_fan\product\11.2.0\dbhome_1'
Running prerequisite checks...
Patch 13423278: Optional component(s) missing : [ oracle.rdbms.ic, 11.2.0.1.0 ] , [ oracle.has.crs, 11.2.0.1.0 ] , [ oracle.usm, 11.2.0.1.0 ]
OPatch 从产品清单中检测到非集群 Oracle 主目录, 将仅对本地系统打补丁。
请关闭本地系统上在此 ORACLE_HOME 之外运行的 Oracle 实例。
(Oracle 主目录 = 'F:\app\mr_fan\product\11.2.0\dbhome_1')
本地系统是否已准备打补丁? [y|n]
本地系统是否已准备打补丁? [y|n]
y
User Responded with: Y
为 Oracle 主目录备份文件和产品清单 (不是用于自动回退)
正在备份受补丁程序 '13423278' 影响的文件以用于还原。此操作将需要一些时间...
正在备份受补丁程序 '13423278' 影响的文件以用于回退。此操作将需要一些时间...

等待补丁安装
在这里插入图片描述
安装完成
在这里插入图片描述
查看补丁清单列表

e:\13423278>yopatch lsinventory
'yopatch' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
e:\13423278>opatch lsinventory
Invoking OPatch 11.1.0.6.6
Oracle 中间补丁程序安装程序版本 11.1.0.6.6
版权所有 (c) 2009, Oracle Corporation。保留所有权利。
Oracle 主目录       : F:\app\mr_fan\product\11.2.0\dbhome_1
主产品清单: C:\Program Files\Oracle\Inventory
   从           : n/a
OPatch 版本    : 11.1.0.6.6
OUI 版本       : 11.2.0.1.0
OUI 位置      : F:\app\mr_fan\product\11.2.0\dbhome_1\oui
日志文件位置 : F:\app\mr_fan\product\11.2.0\dbhome_1\cfgtoollogs\opatch\opatch2020-03-15_18-44-42下午.log
Patch history file: F:\app\mr_fan\product\11.2.0\dbhome_1\cfgtoollogs\opatch\opatch_history.txt
Lsinventory Output file location : F:\app\mr_fan\product\11.2.0\dbhome_1\cfgtoollogs\opatch\lsinv\lsinventory2020-03-15_18-44-42下午.txt
--------------------------------------------------------------------------------
已安装的顶级产品 (1):
Oracle Database 11g                                                  11.2.0.1.0
此 Oracle 主目录中已安装 1 个产品。
中间补丁程序 (1) :
Patch  13423278     : applied on Sun Mar 15 18:40:10 CST 2020
Unique Patch ID:  14296670
   Created on 23 Nov 2011, 02:07:52 hrs PST8PDT
   Bugs fixed:
     13423278, 13329697, 12759946, 12672969, 8509848, 12345717, 9829397
     9654402, 12595606, 8794599, 12572417, 9885553, 11678127, 12794025
     10265545, 10189276, 10019194, 12731983, 12838161, 12400751, 10149919
     12591120, 9842573, 8711391, 12371955, 10093383, 11828358, 12655301
     8860207, 11694194, 10350832, 12541628, 12429529, 9554332, 12363485
     10625485, 9268192, 9935787, 10205230, 12412745, 12393432, 12341758
     10130392, 11853331, 6055658, 11723722, 11735927, 11772687, 9902590
     9871302, 10132870, 7365514, 10422748, 10180190, 9825461, 11731176
     9368502, 9705984, 10302581, 10130633, 8331063, 10237271, 10082277
     10054513, 9695366, 8889137, 10383833, 11076894, 10220194, 10401327
     9042035, 10235640, 9564886, 10104492, 9302054, 10374238, 9613016, 10432045
     8772524, 10357603, 9243068, 9448277, 8672862, 9725141, 9328390, 9275876
     9033671, 10154951, 9890701, 9628444, 10352692, 10086495, 10155684
     10156303, 10157313, 10201938, 10220033, 10278864, 8332021, 8771916
     8800514, 8874588, 8946311, 9003145, 9115829, 9131242, 9240305, 9398685
     9469117, 9569029, 9751158, 8446618, 10245351, 10052141, 10116578
     10134677, 10140809, 10157402, 10172454, 7662438, 8397251, 8499180
     8522654, 9090269, 9234660, 9255996, 9395237, 9461782, 9668086, 9703463
     9736701, 9795214, 9823660, 9826065, 9866728, 9916260, 9972680, 9524640
     8841699, 10216200, 10225758, 10155838, 10030675, 10080167, 10132342
     6866145, 8790561, 8984021, 9096076, 9137871, 9193873, 9277263, 9303326
     9457109, 9457492, 9472669, 9539440, 9659614, 9845644, 9903704, 9920616
     9930649, 10100101, 8780369, 8866808, 8883722, 9004242, 9021724, 9028780
     9049725, 9058865, 9212844, 9243912, 9306119, 9350527, 9387574, 9399991
     9413827, 9488247, 9498108, 9500147, 9532911, 9544104, 9548269, 9578533
     9593656, 9594372, 9706490, 9721013, 9734300, 9746699, 9764806, 9770451
     9778018, 9799342, 9828495, 9881328, 9932143, 10080735, 9901433, 9966926
     8574851, 8790837, 8802195, 8863249, 8981681, 8993052, 9198871, 9217088
     9300021, 9369183, 9442189, 9500046, 9648040, 9657283, 9685694, 9772171
     9847494, 9793452, 9888298, 9135679, 9495697, 9081430, 6855031, 8793567
     9286015, 9442015, 9504322, 9535951, 8684595, 9663844, 9539556, 7452759
     9196440, 8893949, 9011590, 9382101, 9775337, 9083671, 9324531, 8654177
     8569325, 8686932, 9271344, 8434467, 6086930, 9024737, 9047975, 9056912
     9069046, 9336476, 9355794, 9495669, 8467123, 8663644, 8855396, 8886819
     8951812, 8467825, 9187546, 9102860, 9109487, 8546356, 9170308, 8725282
     9308296, 9406607, 8720802, 9711859, 9531984, 9482399, 9471411, 9390484
     9362218, 9320786, 9320130, 9302343, 9290526, 9231605, 8554900, 9490054
     9389304, 8783690, 9577583, 9736229, 9259407, 8602840, 9469133, 8682102
     9693101, 9898160, 9669478, 9736865, 7327630, 8268775, 8505803, 8544696
     8565708, 8633358, 8664189, 8702535, 8755082, 8771556, 8783301, 8790767
     8799099, 8803762, 8839301, 8856478, 8865718, 8872096, 8909984, 8974548
     8981059, 8991997, 9023338, 9032717, 9057443, 9119194, 9145181, 9147830
     9165206, 9170608, 9216806, 9219338, 9227662, 9255542, 9275072, 9321701
     9341448, 9363145, 9363384, 9391025, 9399090, 9467635, 9488887, 9637033
     9711600, 9713537, 9714832, 9719541, 9736836, 7028305, 7519406, 8330783
     8431487, 8477973, 8496830, 8581792, 8607693, 8643160, 8650719, 8717461
     8730312, 8774868, 8813536, 8815639, 8822531, 8822832, 8834425, 8875671
     8879707, 8891929, 8914054, 8918433, 9001453, 9002336, 9007859, 9010222
     9011088, 9015983, 9027691, 9035113, 9041943, 9050716, 9053676, 9054253
     9057754, 9067282, 9068088, 9093300, 9120088, 9145541, 9167285, 9189070
     9202351, 9271246, 9272086, 9294110, 9298307, 9316329, 9378712, 9395500
     9408883, 9467727, 9504129, 9561609, 9584383, 9657157, 9661684, 9489422
     9595786, 8405205, 8543770, 8856467, 8998066, 8897784, 9004697, 9007836
     9036013, 9037724, 9047110, 9318214, 8328200, 8570322, 8629716, 8761974
     8857211, 8885539, 9035438, 8971021, 8685327, 8707506, 8866903, 8771297
     8772028, 8796511
-------------------------------------------------------------------------------
OPatch succeeded.

至此安装完成

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Windows环境下给oracle打补丁详细教程 的相关文章

  • MFC中基于OpenCV实现Picture Control控件成像方法

    MFC中基于OpenCV实现Picture Control控件成像方法有两种 xff0c 一种是OpenCV2 2以前版本的绘制 xff0c 另外一种是OpenCV2 2以后版本的绘制 xff08 1 xff09 在OpenCV2 2之前的
  • MFC中CFileDialog及SHBrowseForFolder

    MFC中实现通过按钮来选择文件路径或文件夹路径 xff1b xff08 1 xff09 CFileDialog类能够选择文件 xff0c 并获取其路径 xff08 当然也可以通过获取文件路径再去除文件名而获得其所在文件夹路径 xff0c 前
  • C++进阶—>带你理解多字节编码与Unicode码

    本篇文章将讲解C 43 43 开发中容易混淆的另一个概念 多字节字符集与Unicode字符集 多字节字符与宽字节字符 char与wchar t 我们知道C 43 43 基本数据类型中表示字符的有两种 xff1a char wchar t c
  • BP神经网络及其C++实现

    0 前言 神经网络在我印象中一直比较神秘 xff0c 正好最近学习了神经网络 xff0c 特别是对Bp神经网络有了比较深入的了解 xff0c 因此 xff0c 总结以下心得 xff0c 希望对后来者有所帮助 神经网络在机器学习中应用比较广泛
  • C++进阶—>Socket通信那点事

    1 网络中进程之间如何通信 xff1f 本地的进程间通信 xff08 IPC xff09 有很多种方式 xff0c 但可以总结为下面4类 xff1a 消息传递 xff08 管道 FIFO 消息队列 xff09 同步 xff08 互斥量 条件
  • C++进阶—>线程同步随笔

    线程同步主要有五种方法 xff1a 原子访问 xff0c 临界区 xff0c 信号量 xff0c 事件和互斥量 xff1b 其中原子访问和临界区属于用户模式的同步 xff1b 信号量 xff0c 事件和互斥量属于内核模式的同步 原子访问是通
  • C++进阶—>_beginthreadex和CreateThread的区别和联系

    beginthread 和 CreateThread 的区别 转自 http wenku baidu com view adede4ec4afe04a1b071dea4 html 程序员对于Windows程序中应该用 beginthread
  • idea src下源文件和class编译文件不一致

    今天遇到一个神奇BUG xff0c 一个和elasticsearch没有任何关系的项目 xff0c 报错ES某个包找不到 xff0c 刚开始以为是依赖了父项目的某个包 xff0c 并且本项目主启动类ComponentScan扫描了相关的类进
  • C++进阶—>Win32 多线程的创建方法和基本使用

    Summary From xff1a https software intel com zh cn blogs 2011 12 02 win32 cid 61 sw prccsdn2086 总结Win32提供的创建多线程相关的API接口和基
  • Windows核心编程之多进程概述

    一 进程的概念 进程是是一个正在运行的程序的实例 xff08 飘 xff5e xff5e xff5e xff09 xff0c 是系统分配资源的单位 线程是执行的单位 xff0c 包括内存 xff0c 打开的文件 处理机 外设等 xff0c
  • Windows核心编程之进程间通信

    1 进程与进程通信 进程是装入内存并准备执行的程序 xff0c 每个进程都有私有的虚拟地址空间 xff0c 由代码 数据以及它可利用的系统资源 如文件 管道等 组成 多进程 多线程是Windows操作系统的一个基本特征 Microsoft
  • Windows核心编程之邮槽实现进程间通信

    邮槽是Windows系统提供的一种单向通信的机制 即进程中的一方只能写入或读取数据 xff0c 而另一方则只能读取或写入数据 通过邮槽 xff0c 用户可以实现一对多或跨网络的进程之间的通信 但是 xff0c 邮槽能传输的数据非常小 xff
  • 图像连通域分析

    转自 xff1a https blog csdn net tiandijun article details 51279643 xff0c 转载仅为方便学习 一 前言 二值图像的图像的亮度值只有两个状态 xff1a 黑 0 和白 255 二
  • C++ wchar_t *和char * 互转

    转自 xff1a https blog csdn net lightspear article details 54695123 说道wchar t和char两个类型大家都不会陌生 wchar t xff1a 在windows下是Unico
  • android识别模拟器

    识别安卓模拟器的两种方案 xff01 禁止通过模拟器进行刷量 xff0c 防止作弊行为 xff01 import android content Context import android content Intent import an
  • ubuntu在终端中打开文件管理器

    打开ubuntu的终端 xff0c 输入nautilus path 弹出资源管理器界面
  • chrome jsonView插件安装

    由于谷歌浏览器经常打不开应用商店 xff0c 还有就是安装第三方插件的办法 方法就如下 xff1a 由于最近做和json相关的东西 xff0c 所以 xff0c 以jsonView插件为例分享一下 1 打开https github com
  • Gradle学习笔记 使用Gradle Wrapper

    Gradle可以在没有安装Gradle的情况下使用 xff0c 这时候就需要Gradle Wrapper了 Gradle Wrapper其实就是一个脚本文件 xff0c 它会在没有安装Gradle的情况下为我们下载Gradle xff0c
  • 《30天自制操作系统》:值得推荐的一本好书

    自己编写一个操作系统 xff0c 是许多程序员的梦想 也许有人曾经挑战过 xff0c 但因为太难而放弃了 其实你错了 xff0c 你的失败并不是因为编写操作系统太难 xff0c 而是因为没有人告诉你那其实是一件很简单的事 那么 xff0c
  • 验证谷角猜想

    import java util public class Test3 3 验证谷角猜想 xff1a 日本数学家谷角静夫在研究自然数时发现了一个奇怪的现象 对于任意一个自然数n xff0c 若n为偶数 xff0c 则将其除以2 xff1b

随机推荐