您当前的位置: 首页 > 数据库教程 > Oracle教程 > 查看及管理Oraclepatch

查看及管理Oraclepatch

作者:不详 来源:网络 发布时间: 2014-08-23 20:46 点击:
Oracle patch也即是Oracle补叮Oracle补丁又包含好几个种类,小的补丁简直是难以数计,难免让人眼花缭乱。尽管如此,Oracle patch还是有序可循的。而且Oracle提供的opatch工具非常方便的用于安装oracle patch,以及查看当前系统已经安装的patch。本文列出了patch的几种

查看及管理Oraclepatch

  Oracle patch也即是Oracle补叮Oracle补丁又包含好几个种类,小的补丁简直是难以数计,难免让人眼花缭乱。尽管如此,Oracle patch还是有序可循的。而且Oracle提供的opatch工具非常方便的用于安装oracle patch,以及查看当前系统已经安装的patch。本文列出了patch的几种类型,以及主要描述通过opatch工具查看当前数据库的patch应用的情况。对于如何apply patch可参考Oracle官方文档。

  1、Oracle patch类型

  Critical Patch Update (CPU)

  Bundled patches (For Windows and Exadata only)

  PSR(Patch Set Release)/Patch Set Update(PSU)

  ?

  

  

  

  

  

  

  

  


  1

  2

  3

  4

  5

  6

  7

  8

  9

  10

  11

  12

  13

  14

  15

  16

  17

  18

  19

  20

  21

  22

  23

  24

  25

  26

  27

  28

  29

  30

  31

  32

  33

  34

  35

  36

  37

  38

  39

  40

  41

  42

  43

  44

  45

  46

  47

  48

  49

  50

  51

  52

  53

  54

  55

  56

  57

  58

  59

  60

  61

  62

  63

  64

  65

  66

  67

  68

  69

  70

  71

  72

  73

  74

  75

  76

  77

  78

  79

  80

  81

  82

  83

  84

  85

  86

  87

  88

  89

  90

  91

  92

  93

  94

  95

  96

  97

  98

  99

  100

  101

  102

  103

  104

  105

  106

  107

  108

  109

  110

  111

  112

  113

  114

  115

  116

  117

  118

  119

  120

  121

  122

  123

  124

  125

  126

  127

  128

  129

  130

  131

  132

  133

  134

  135

  136

  137

  138

  139

  140

  141

  142

  143

  144

  145

  146

  147

  148

  149

  150

  151

  152

  153

  154

  155

  156

  157

  158

  159

  160

  161

  162

  163

  164

  165

  166

  167

  168

  169

  170

  171

  172

  


  Oracle 为我们提供了用于patch安装、回退、管理与追踪的工具opatch,该工具为命令行工具,简单易用,可以根据opatch的帮助命令来获取帮助信息

  #获得opatch的帮助信息

  [oracle@linux1 OPatch]$ ./opatch -help

  Invoking OPatch 11.1.0.6.6  #opatch的版本

  Oracle Interim Patch Installer version 11.1.0.6.6

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

  Usage: opatch [ -help ] [ -r[eport] ] [ command ]

              command := apply         #安装patch

                         lsinventory   #查看所有已安装的patch

                         napply        #用于Apply a set of patches at a time

                         nrollback     #用于Rollback a set of patches at a time

                         rollback      #Rollback an existing one-off patch indicated by the reference-id

                         query        

                         version

                         prereq        #用于检查安装patch之前的先决条件

                         util

  <global_arguments> := -help      Displays the help message for the command.

                         -report    Print the actions without executing.

  example:                            #可以通过下面的方式来查看每一个具体命令的用法

     'opatch -help'

     'opatch apply -help'        

     'opatch lsinventory -help'  

     'opatch napply -help'       

     'opatch nrollback -help'

     'opatch rollback -help'

     'opatch prereq -help'

     'opatch util -help'

    

  OPatch succeeded.

  #下面查看oracle 10g下的补丁信息,对于如何安装补丁,本文不作演示

  oracle@M10DB01p:/users/oracle/OraHome10g/OPatch> ./opatch lsinventory

  Invoking OPatch 10.2.0.3.0

      .........

  Oracle Home      : /users/oracle/OraHome10g

  Central Inventory : /users/oracle/oraInventory

     from          : /etc/oraInst.loc

  OPatch version   : 10.2.0.3.0

  OUI version      : 10.2.0.3.0

  OUI location     : /users/oracle/OraHome10g/oui

  Log file location : /users/oracle/OraHome10g/cfgtoollogs/opatch/opatch2013-12-19_09-54-27AM.log

  Lsinventory Output file location : /users/oracle/OraHome10g/cfgtoollogs/opatch/lsinv/lsinventory2013-12-19_09-54-27AM.txt

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

  Installed Top-level Products (2):

  Oracle Database 10g                                                 10.2.0.1.0 #基础版本号

  Oracle Database 10g Release 2 Patch Set 2                           10.2.0.3.0 #PSR号为3

  There are 2 products installed in this Oracle Home.

  Interim patches (2) :                                               #列出了2个临时补丁patch号及bug号

  Patch 5556081     : applied on Wed Feb 15 11:16:15 HKT 2012

     Created on 9 Nov 2006, 22:20:50 hrs PST8PDT

     Bugs fixed:

       5556081

  Patch 5557962     : applied on Wed Feb 15 11:16:08 HKT 2012

     Created on 9 Nov 2006, 23:23:06 hrs PST8PDT

     Bugs fixed:

       4269423, 5557962, 5528974

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

  OPatch succeeded.

  #也可以通过查询dba_server_registry查看当前数据补丁的使用情况

  SQL> select comp_name,version from dba_server_registry;

  COMP_NAME                                         VERSION

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

  Oracle XML Database                               10.2.0.3.0

  Oracle Label Security                             10.2.0.3.0

  Oracle Expression Filter                          10.2.0.3.0

  Oracle Rules Manager                              10.2.0.3.0

  Oracle Workspace Manager                          10.2.0.1.0

  Oracle Database Catalog Views                     10.2.0.3.0

  Oracle Database Packages and Types                10.2.0.3.0

  JServer JAVA Virtual Machine                      10.2.0.3.0

  Oracle XDK                                        10.2.0.3.0

  Oracle Database Java Packages                     10.2.0.3.0

  10 rows selected.

  #下面是Oracle 11g下使用lsinventory -detail时patch的应用情况

  [oracle@linux1 OPatch]$ ./opatch lsinventory -detail

  Invoking OPatch 11.1.0.6.6

  Oracle Interim Patch Installer version 11.1.0.6.6

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

                ...............(省略)

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

  Installed Top-level Products (1):

  Oracle Database 11g                                                 11.2.0.1.0

  There are 1 products installed in this Oracle Home.

  Installed Products (134):

  Agent Required Support Files                                        10.2.0.4.2

  Assistant Common Files                                              11.2.0.1.0

  Bali Share                                                          1.1.18.0.0

  Buildtools Common Files                                             11.2.0.1.0

  Character Set Migration Utility                                     11.2.0.1.0

  Cluster Verification Utility Common Files                           11.2.0.1.0

  Database Configuration and Upgrade Assistants                       11.2.0.1.0

                 ...............(省略)

  SSL Required Support Files for InstantClient                        11.2.0.1.0

  Sun JDK                                                             1.5.0.17.0

  XDK Required Support Files                                          11.2.0.1.0

  XML Parser for Java                                                 11.2.0.1.0

  XML Parser for Oracle JVM                                           11.2.0.1.0

  There are 134 products installed in this Oracle Home.

  Interim patches (1) :

  Patch 8670579     : applied on Thu Aug 15 17:53:20 CST 2013

  Unique Patch ID: 12243614

     Created on 25 Feb 2010, 09:55:12 hrs US/Eastern

     Bugs fixed:

       8670579

     Files Touched:      #这里列出了相应的文件

       /ahseteco.o --> ORACLE_HOME/lib/libnnz11.a

       /am11rkg.o --> ORACLE_HOME/lib/libnnz11.a

       /amsha.o --> ORACLE_HOME/lib/libnnz11.a

       /cpui32.o --> ORACLE_HOME/lib/libnnz11.a

       /sha.o --> ORACLE_HOME/lib/libnnz11.a

       /x931rand.o --> ORACLE_HOME/lib/libnnz11.a

       /am11dkg.o --> ORACLE_HOME/lib/libnnz11.a

       /am931rnd.o --> ORACLE_HOME/lib/libnnz11.a

       /amsharnd.o --> ORACLE_HOME/lib/libnnz11.a

       /ghash.o --> ORACLE_HOME/lib/libnnz11.a

       /shacomm.o --> ORACLE_HOME/lib/libnnz11.a

       libnnz11.so --> ORACLE_HOME/lib/libnnz11.so

     Patch Location in Inventory:

       /u01/app/oracle/db_1/inventory/oneoffs/8670579

     Patch Location in Storage area:

       /u01/app/oracle/db_1/.patch_storage/8670579_Feb_25_2010_09_55_12

  Rac system comprising of multiple nodes  #列出了当前环境的节点

    Local node = linux1

    Remote node = linux2

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

  OPatch succeeded.

  #下面是Oracle 11g下使用使用lsinventory -bugs_fixed来查看patch的情形

  [oracle@linux1 OPatch]$ ./opatch lsinventory -bugs_fixed

  Invoking OPatch 11.1.0.6.6

               ...............(省略)

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

  Installed Top-level Products (1):

  Oracle Database 11g                                                 11.2.0.1.0

  There are 1 products installed in this Oracle Home.

  List of Bugs fixed by Installed Patches:

  Bug       Fixed by Installed at                  Description

              Patch                                            

  ---       -------- ------------                  ----------- #下面给出了和bug有关的具体描述

  8670579   8670579  Thu Aug 15 17:53:20 CST 2013  DBBETA :NETCA/DBCA FAILED WITH HOTSPOT VIRTUAL MACHINE

  Rac system comprising of multiple nodes

    Local node = linux1

    Remote node = linux2

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

  OPatch succeeded.

  
分享到:
本文"查看及管理Oraclepatch"由远航站长收集整理而来,仅供大家学习与参考使用。更多网站制作教程尽在远航站长站。
顶一下
(0)
0%
踩一下
(0)
0%
[点击 次] [返回上一页] [打印]
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 密码: 验证码:
关于本站 - 联系我们 - 网站声明 - 友情连接- 网站地图 - 站点地图 - 返回顶部
Copyright © 2007-2013 www.yhzhan.com(远航站长). All Rights Reserved .
远航站长:为中小站长提供最佳的学习与交流平台,提供网页制作与网站编程等各类网站制作教程.
官方QQ:445490277 网站群:26680406 网站备案号:豫ICP备07500620号-4