您现在的位置是:首页 >

怎么使用补丁 教你快速掌握如何使用Opatch打补丁

火烧 2022-03-13 23:22:20 1054
教你快速掌握如何使用O atch打补丁   在实际的工作和学习中 很多人都会发现有些Patch没有 etu 安装程序 本文中我们将详细的介绍如何使用Oracle的o atch工具来进行安装     

教你快速掌握如何使用Opatch打补丁  

  在实际的工作和学习中 很多人都会发现有些Patch没有setup安装程序 本文中我们将详细的介绍如何使用Oracle的opatch工具来进行安装

  

   下载

  

  Opatch的最新版本可以从Metalink下载 参考 Note:

  

  (Opatch Where Can I Find the Latest Version of Opatch?)

  

  

   准备工作

  

  # You must have Perl (or later)

  

  # installed under the ORACLE_HOME or elsewhere within the host

  

  # environment OPatch is no longer included in patches as of

  

  # Refer to the following link for details on Perl and OPatch:

  

  # tabase_id=NOT&p_id=

  

  下载Optach后 上传到$ORACLE_HOME

  

  [/app/oracle/product/ /OPatch]$chmod *

  

  [/app/oracle/product/ /OPatch]$ opatch version

  

  Invoking OPatch

  

  

  OPatch Version:

  

  

  OPatch succeeded

  

  

  [/app/oracle/product/ /OPatch]$ opatch lsinventory

  

  Invoking OPatch

  

  

  Oracle Interim Patch Installer version

  

  Copyright (c) Oracle Corporation All rights reserved

  

  

  Oracle Home : /app/oracle/product/

  

  Central Inventory : /app/oracle/oraInventory

  

  from : /var/opt/oracle/oraInst loc

  

  OPatch version :

  

怎么使用补丁 教你快速掌握如何使用Opatch打补丁

  OUI version :

  

  OUI location : /app/oracle/product/ /oui

  

  Log file location : /app/oracle/product/ /cfgtoollogs/opatch/opatch _ PM log

  

  

  LsInventorySession failed:

  

  The Oracle Home does not meet OUI version requirement

  

  This OPatch (version ) detects OUI version in the home

  

  It requires OUI version or above

  

  

  OPatch failed with error code

  

  原因 Opatch的版本过高

  

  下载新的Opatch 重新执行opatch lsinventory

  

  [/app/oracle/product/ /OPatch]$ opatch lsinventory

  

  Oracle Interim Patch Installer version

  

  Copyright (c) Oracle Corporation All Rights Reserved

  

  

  We remend you refer to the OPatch documentation under

  

  OPatch/docs for usage reference We also remend using

  

  the latest OPatch version For the latest OPatch version

  

  and other support related issues please refer to document

  

   which is viewable from

  

  

  Oracle Home : /app/oracle/product/

  

  Oracle Home Inventory : /app/oracle/product/ /inventory

  

  Central Inventory : /app/oracle/oraInventory

  

  from : /var/opt/oracle/oraInst loc

  

  OUI location : /app/oracle/product/ /oui

  

  OUI shared library : /app/oracle/product/ /oui/lib/hpunix/liboraInstaller sl

  

  Java location : /app/oracle/product/ /jre/ /bin/java

  

  Log file location : /app/oracle/product/ / patch_storage//* log

  

  

  Creating log file /app/oracle/product/ / patch_storage/LsInventory__ _ log

  

  

  Result:

  

  

  

  There is no Interim Patch

  

  

  

  

  

  OPatch succeeded

  

  

   具体范例及遇到的问题

  

  下面以打补丁 为例

  

  [/app/oracle/product/ /patches/ ]$opatch apply

  

  报错

  

  Invoking fuser to check for active processes

  

  

  Invoking fuser on /app/oracle/product/ /bin/oracle

  

  Problems when checking for files that are active

  

  There were problems when checking for active processes on critical files

  

  

  The patch tool runs the mand fuser to check that critical files are not in use Make sure fuser is available and executable on your PATH

  

  

  

  ERROR: OPatch failed during pre reqs check

  

  原因为fuser没有执行权限 su root

  

  /usr/sbin#chmod +x fuser

  

  重新命令 打Patch成功

  

  用opatch lsinventory显示打patch结果

  

  [/app/oracle/product/ /OPatch]$ opatch lsinventory

  

  

  Oracle Interim Patch Installer version

  

  Copyright (c) Oracle Corporation All Rights Reserved

  

  

  We remend you refer to the OPatch documentation under

  

  OPatch/docs for usage reference We also remend using

  

  the latest OPatch version For the latest OPatch version

  

  and other support related issues please refer to document

  

   which is viewable from

  

  

  Oracle Home : /app/oracle/product/

  

  Oracle Home Inventory : /app/oracle/product/ /inventory

  

  Central Inventory : /app/oracle/oraInventory

  

  from : /var/opt/oracle/oraInst loc

  

  OUI location : /app/oracle/product/ /oui

  

  OUI shared library : /app/oracle/product/ /oui/lib/hpunix/liboraInstaller sl

  

  Java location : /app/oracle/product/ /jre/ /bin/java

  

  Log file location : /app/oracle/product/ / patch_storage//* log

  

  

  Creating log file /app/oracle/product/ / patch_storage/LsInventory__ _ log

  

  

  Result:

  

  

  

  Installed Patch List:

  

  =====================

  

   ) Patch applied on Wed Feb : : GMT+ :

  

  [ Base Bug(s): ]

  

  OPatch succeeded

  

  

   最后通过opatch查看数据库各组件版本

  

lishixinzhi/Article/program/Oracle/201311/18427  
永远跟党走
  • 如果你觉得本站很棒,可以通过扫码支付打赏哦!

    • 微信收款码
    • 支付宝收款码