Patch 21352635 - Database Patch Set Update 11.2.0.4.8

一、OPatch工具检查及升级

OPatch工具包,在安装目录$ORACLE_HOME下,PSU安装升级,都是通过OPatch来完成的。PSU的升级安装对OPatch的版本有一定的要求,关于这一点,可以查看PSU的Readme文档。例如,要安装p21352635_112040_Linux-x86-64,则必须要11.2.0.3.6或更高版本的OPatch。

1.1、确定当前系统的OPatch版本。

方法如下所示:

[oracle@Oracle11g ~]$cd /u01/app/oracle/product/11.2.0/db_1/OPatch/

[oracle@Oracle11g OPatch]$./opatch version

Invoking OPatch 11.1.0.6.6

OPatch Version: 11.1.0.6.6

OPatch succeeded.

显然,当前系统的OPatch版本不适合安装补丁p21352635_112040_Linux-x86-64,要先升级OPatch,升级步骤如下:

1.2、备份当前版本的OPatch

[oracle@Oracle11g db_1]$ tar cvf OPatch.tar OPatch/# 也可以直接覆盖

[oracle@Oracle11g db_1]$ cd OPatch

[oracle@Oracle11g OPatch]$ rm -rf *   --删除文件

1.3、下载对于版本的OPatch解压至$ORACLE_HOME目录下

然后授予执行权限。

[oracle@Oracle11g opatchs]$ cd  /home/oracle/opatchs   --这个是存放补丁包的目录

[oracle@Oracle11g opatchs]$ ls -ltr

总计 122932

drwxrwxr-x 10 oracle oinstall     4096 2015-09-01 21352635

-rw-rw-r--  1 oracle oinstall    65235 2015-10-24 PatchSearch.xml

-rw-r--r--  1 oracle oinstall 72935280 2017-06-19 p21352635_112040_Linux-x86-64.zip安全漏洞的补丁包

-rw-r--r--  1 oracle oinstall 52733900 2017-06-19 p6880880_112000_Linux-x86-64.zip  --升级opatch的补丁包

[oracle@Oracle11g opatchs]$ unzip p6880880_112000_Linux-x86-64.zip -d /u01/app/oracle/product/11.2.0/db_1 

--解压opatch升级包至$ORACLE_HOME目录下

[oracle@Oracle11g OPatch]$ cd /u01/app/oracle/product/11.2.0/db_1/OPatch

[oracle@Oracle11g OPatch]$ chmod +x opatch opatch.bat opatchdiag opatchdiag.bat

1.4、重新验证OPatch版本

[oracle@Oracle11g OPatch]$ cd

/u01/app/oracle/product/11.2.0/db_1/OPatch

 

[oracle@Oracle11g OPatch]$./opatch version

OPatch Version: 11.2.0.3.12

OPatch succeeded.–okopatch版本升级成功

二、应用补丁

主要,首先必须保证数据库实例+监听正常关闭。

[oracle@Oracle11g opatchs]$ cd  /home/oracle/opatchs这是存放补丁包的路径

[oracle@Oracle11g opatchs]$ unzip p21352635_112040_Linux-x86-64.zip

……

篇幅很长,略

……

[oracle@Oracle11g opatchs]$ cd 21352635/

[oracle@Oracle11g 21352635]$ /u01/app/oracle/product/11.2.0/db_1/OPatch/opatchprereqCheckConflictAgainstOHWithDetail -ph ./  --这是预安装的检查

Oracle 中间补丁程序安装程序版本 11.2.0.3.12

版权所有 (c) 2017, Oracle Corporation。保留所有权利。

PREREQ session

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

OUI version       : 11.2.0.1.0

Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2017-05-26_20-34-20下午_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

[oracle@Oracle11g 21352635]$ /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/opatch2016-07-12_09-40-56AM_1.log

 

Verifying environment and performing prerequisite checks...

OPatch continues with these patches:   17478514  18031668  18522509  19121551  19769489  20299013  20760982  21352635 

 

Do you want to proceed? [y|n]

 

...省略部分内容...

 

Backing up files...

Applying sub-patch '17478514' to OH '/u01/app/oracle/product/11.2.0/db_1'

 

Patching component oracle.rdbms, 11.2.0.4.0...

 

Patching component oracle.rdbms.rsf, 11.2.0.4.0...

 

Patching component oracle.sdo, 11.2.0.4.0...

 

Patching component oracle.sysman.agent, 10.2.0.4.5...

 

Patching component oracle.xdk, 11.2.0.4.0...

 

Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...

 

Patching component oracle.sdo.locator, 11.2.0.4.0...

 

Patching component oracle.nlsrtl.rsf, 11.2.0.4.0...

 

Patching component oracle.xdk.rsf, 11.2.0.4.0...

 

Patching component oracle.rdbms.rman, 11.2.0.4.0...

 

Verifying the update...

Applying sub-patch '18031668' to OH '/u01/app/oracle/product/11.2.0/db_1'

 

Patching component oracle.rdbms, 11.2.0.4.0...

 

Patching component oracle.rdbms.rsf, 11.2.0.4.0...

 

Patching component oracle.ldap.rsf, 11.2.0.4.0...

 

Patching component oracle.rdbms.crs, 11.2.0.4.0...

 

Patching component oracle.precomp.common, 11.2.0.4.0...

 

Patching component oracle.ldap.rsf.ic, 11.2.0.4.0...

 

Patching component oracle.rdbms.deconfig, 11.2.0.4.0...

 

Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...

 

Patching component oracle.rdbms.rman, 11.2.0.4.0...

 

Verifying the update...

Applying sub-patch '18522509' to OH '/u01/app/oracle/product/11.2.0/db_1'

 

Patching component oracle.rdbms.rsf, 11.2.0.4.0...

 

Patching component oracle.rdbms, 11.2.0.4.0...

 

Patching component oracle.precomp.common, 11.2.0.4.0...

 

Patching component oracle.rdbms.rman, 11.2.0.4.0...

 

Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...

 

Patching component oracle.rdbms.deconfig, 11.2.0.4.0...

 

Verifying the update...

Applying sub-patch '19121551' to OH '/u01/app/oracle/product/11.2.0/db_1'

 

Patching component oracle.precomp.common, 11.2.0.4.0...

 

Patching component oracle.sysman.console.db, 11.2.0.4.0...

 

Patching component oracle.rdbms.rsf, 11.2.0.4.0...

 

Patching component oracle.rdbms.rman, 11.2.0.4.0...

 

Patching component oracle.rdbms, 11.2.0.4.0...

 

Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...

 

Patching component oracle.ordim.client, 11.2.0.4.0...

 

Patching component oracle.ordim.jai, 11.2.0.4.0...

 

Verifying the update...

Applying sub-patch '19769489' to OH '/u01/app/oracle/product/11.2.0/db_1'

ApplySession: Optional component(s) [ oracle.sysman.agent, 11.2.0.4.0 ]  not present in the Oracle Home or a higher version is found.

 

Patching component oracle.precomp.common, 11.2.0.4.0...

Patching component oracle.ovm, 11.2.0.4.0...

 

Patching component oracle.xdk, 11.2.0.4.0...

 

Patching component oracle.rdbms.util, 11.2.0.4.0...

 

Patching component oracle.rdbms, 11.2.0.4.0...

 

Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...

 

Patching component oracle.xdk.parser.java, 11.2.0.4.0...

 

Patching component oracle.oraolap, 11.2.0.4.0...

 

Patching component oracle.rdbms.rsf, 11.2.0.4.0...

 

Patching component oracle.xdk.rsf, 11.2.0.4.0...

 

Patching component oracle.rdbms.rman, 11.2.0.4.0...

 

Patching component oracle.rdbms.deconfig, 11.2.0.4.0...

 

Verifying the update...

Applying sub-patch '20299013' to OH '/u01/app/oracle/product/11.2.0/db_1'

 

Patching component oracle.rdbms.dv, 11.2.0.4.0...

 

Patching component oracle.rdbms.oci, 11.2.0.4.0...

 

Patching component oracle.precomp.common, 11.2.0.4.0...

 

Patching component oracle.sysman.agent, 10.2.0.4.5...

 

Patching component oracle.xdk, 11.2.0.4.0...

 

Patching component oracle.sysman.common, 10.2.0.4.5...

 

Patching component oracle.rdbms, 11.2.0.4.0...

 

Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...

 

Patching component oracle.xdk.parser.java, 11.2.0.4.0...

 

Patching component oracle.sysman.console.db, 11.2.0.4.0...

 

Patching component oracle.xdk.rsf, 11.2.0.4.0...

 

Patching component oracle.rdbms.rsf, 11.2.0.4.0...

 

Patching component oracle.sysman.common.core, 10.2.0.4.5...

 

Patching component oracle.rdbms.rman, 11.2.0.4.0...

 

Patching component oracle.rdbms.deconfig, 11.2.0.4.0...

 

Verifying the update...

Applying sub-patch '20760982' to OH '/u01/app/oracle/product/11.2.0/db_1'

 

Patching component oracle.sysman.console.db, 11.2.0.4.0...

 

Patching component oracle.rdbms, 11.2.0.4.0...

 

Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...

 

Verifying the update...

Applying sub-patch '21352635' to OH '/u01/app/oracle/product/11.2.0/db_1'

 

Patching component oracle.sysman.agent, 10.2.0.4.5...

 

Patching component oracle.rdbms.rsf, 11.2.0.4.0...

 

Patching component oracle.rdbms.rman, 11.2.0.4.0...

 

Patching component oracle.rdbms, 11.2.0.4.0...

 

Verifying the update...

Composite patch 21352635 successfully applied.

Log file location: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2016-07-12_09-40-56AM_1.log

 

OPatch succeeded.

四、运行catbundle.sql和utlrp.sql脚本,对于RAC环境,仅需要在一个节点上运行。

(1)、catbundle.sql将补丁信息反射到数据库中,使数据库知道你最后一次打了什么补丁或者回滚了哪些补丁。

[oracle@Oracle11g 21352635]$ cd $ORACLE_HOME/rdbms/admin

[oracle@Oracle11g admin]$ sqlplus /nolog

SQL> CONNECT / AS SYSDBA

SQL> STARTUP;

SQL>@catbundle.sql  psu apply

SQL>exit

(2)、utlrp.sql脚本可以在数据库运行的状态下编译数据库中的invalid对象,Oracle建议在对数据库进行迁移、升级、降级后都运行一遍utlrp.sql以编译无效对象。

cd $ORACLE_HOME/rdbms/admin

sqlplus /nolog

SQL> CONNECT / AS SYSDBA

SQL>@utlrp.sql

(3)、查看 $ORACLE_HOME/cfgtoollogs/catbundle or

$ORACLE_BASE/cfgtoollogs/catbundle目录下的的日志文件是否记录错误。

catbundle_PSU_<database SID>_APPLY_<TIMESTAMP>.log

catbundle_PSU_<database SID>_GENERATE_<TIMESTAMP>.log

至此,本次patch过程结束。

三、确认升级后补丁信息

(1)、通过OPatch的信息库记录,可以看到补丁信息。

[oracle@Oracle11g 21352635]$ $ORACLE_HOME/OPatch/opatchlsinventory

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/opatch2016-07-12_11-01-23AM_1.log

Lsinventory Output file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2016-07-12_11-01-23AM.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  21352635     : applied on Tue Jul 12 09:50:04 CST 2016

Unique Patch ID:  19227862

Patch description:  "Database Patch Set Update : 11.2.0.4.8 (21352635)"

Created on 1 Sep 2015, 07:49:44 hrs

Sub-patch  20760982; "Database Patch Set Update : 11.2.0.4.7 (20760982)"

Sub-patch  20299013; "Database Patch Set Update : 11.2.0.4.6 (20299013)"

…….

篇幅太长略

……

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

OPatch succeeded.

Opatch使用细则的更多相关文章

  1. ORACLE查看补丁出现“OPatch failed with error code 1”

    案例场景:               在Oracle Linux Server release 5.7上安装完ORACLE 10g后,顺便将PSR(Patch Set Release)p681018 ...

  2. ORACLE opatch命令学习实践

      opatch 是ORACLE开发的用来安装,卸载,检测patch冲突.管理ORACLE所有已经安装的补丁的工具,当然这是一个命令工具.opatch命令工具一般位于$ORACLE_HOME/OPat ...

  3. Oracle to_char()函数的使用细则

    Oracle to_char()函数的使用细则,学习连接 http://www.cnblogs.com/reborter/archive/2008/11/28/1343195.html

  4. Lock file left by a different patch, OPatch will not try re-using the lock file.

    OPatch在打补丁的过程中被中断,重新执行后报以下错误: UtilSession failed: Lock file left by a different patch, OPatch will n ...

  5. OPatch failed with error code 73

    前几天给一套LINUX下的RAC数据库打补丁升级,有一台机器更新失败了,相关的异常内容如下: Restoring "/u01/app/oracle/11.2.0/db_1" to ...

  6. Oracle 补丁及opatch 工具介绍

    一. CPU(Critical Patch Update) 一个CPU内包含了对多个安全漏洞的修复,并且也包括相应必需的非安全漏洞的补丁.CPU是累积型的,只要安装最新发布的CPU即可,其中包括之前发 ...

  7. 12c 补丁架构 以及opatch 功能

    cd $ORACLE_HOME/ccr/bin ./emocmrsp oracle@qc550705:/oracle/app/oracle/product/12.1.0.2/db_1/ccr/bin& ...

  8. opatch auto in windows db in 11.2.0.4

    --prapare:copy 192.168.63.83 D:\oracle_patch\1612 to 192.168.2.169 D:\oracle_patch\1612cd D:\oracle_ ...

  9. [转帖]Oracle 补丁体系(PSR/PSU/CPU) 及 opatch 工具 介绍

    Oracle 补丁体系(PSR/PSU/CPU) 及 opatch 工具 介绍 原文:http://blog.csdn.net/tianlesoftware/article/details/58095 ...

随机推荐

  1. js多物体运动之淡入淡出效果

    <!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8&quo ...

  2. git介绍和常用命令总结

    git中经常用的命令就是以下六个: 以下是命令总结: 另外,自己碰到的问题及解决方法: 在分支内提交远程仓库,-am: revert后进入vim,一直按住esc ,再连续按大写的z两次就退出来了: g ...

  3. Java 字符串常用操作(String类)

    字符串查找 String提供了两种查找字符串的方法,即indexOf与lastIndexOf方法. 1.indexOf(String s) 该方法用于返回参数字符串s在指定字符串中首次出现的索引位置, ...

  4. 【BZOJ】1830: [AHOI2008]Y型项链

    题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=1830 直接枚举目标串是什么,目标串一定是三个字符串的某一个前缀(注意可能为空),然后判断一 ...

  5. js_为元素动态注册事件

    <head> <title></title> <script type="text/javascript">//window.onl ...

  6. python3.5学习第一章

    在python中,变量赋值或者其他语句后不需要加”:“ python中,缩进特别重要! 条件语句和循环语句,要加”:“ 一.变量赋值 name = "cecelia"name2 = ...

  7. 学习笔记2—MATLAB的copyfile技巧

    clearclc %一.新建文件夹,%二.将原始路径下的数据剪切到新建文件夹中 path = ('E:\DFC_DMN_ASD_DATA_res\Cluster_hcc\4,6,8\Cluster_6 ...

  8. RTTI(运行时类型识别),typeid,dynamic_cast

    dynamic_cast注意: 1.只能应用于指针和引用的转换: 2.要转换的类型中必须包含虚函数: 3.转换成功则返回地址,如果失败则返回NULL: 参见项目:RTTI

  9. LeetCode第[20]题(Java):Valid Parentheses

    题目:有效的括号序列 难度:Easy 题目内容: Given a string containing just the characters '(', ')', '{', '}', '[' and ' ...

  10. ACM-ICPC 2018 沈阳赛区网络预赛 J Ka Chang

    Ka Chang 思路: dfs序+树状数组+分块 先dfs处理好每个节点的时间戳 对于每一层,如果这一层的节点数小于sqrt(n),那么直接按照时间戳在树状数组上更新 如果这一层节点个数大于sqrt ...