zoukankan      html  css  js  c++  java
  • 如何应用版本更新 12.2.0.1.210420(补丁 32507738 – 2021 年 4 月 RU)

    Oracle 最近发布了 2021 年 4 月的 12cR2 版本更新(补丁 32507738)。这篇文章将介绍如何使用最新的 RU 修补 Oracle 12cR2 数据库。(对于 19.11 RU,请阅读如何应用版本更新 19.11.0.0.0(补丁 32545013))。  

    步骤 1:安装最新的 OPatch

    任何修补过程的第一步是下载并安装最新版本的 OPatch。您可以按照如何将 OPatch 升级到最新版本帖子快速将 OPatch 升级到最新版本。

    步骤 2:从 Metalink 下载补丁 32545013。

    从 Metalink ( https://support.oracle.com/ ) 下载与您的平台相关的“Patch 32507738:DATABASE APR 2021 RELEASE UPDATE 12.2.0.1.210420”。  
    1
    2
    3
    4
    5
    oracle> opatch version
    OPatch Version: 12.2.0.1.24
     
    OPatch succeeded.
    oracle>

    步骤 3:检查补丁冲突

    将上面第 2 步中下载的 zip 文件移动到 Oracle 具有相关读/写权限的目录,然后解压缩该文件,这将创建一个名为 32507738 的文件夹。导航到该目录并在 prereq 模式下调用 OPatch:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    oracle> opatch prereq CheckConflictAgainstOHWithDetail -ph ./
    Oracle Interim Patch Installer version 12.2.0.1.24
    Copyright (c) 2021, Oracle Corporation.  All rights reserved.
     
    PREREQ session
     
    Oracle Home       : /apps/oracle/server/12.2.0.1/dbhome_1
    Central Inventory : /apps/oracle/server/12.2.0.1/oraInventory
       from           : /apps/oracle/server/12.2.0.1/dbhome_1/oraInst.loc
    OPatch version    : 12.2.0.1.24
    OUI version       : 12.2.0.1.4
    Log file location : /apps/oracle/server/12.2.0.1/dbhome_1/cfgtoollogs/opatch/opatch2021-04-24_19-16-02PM_1.log
     
    Invoking prereq "checkconflictagainstohwithdetail"
     
    Prereq "checkConflictAgainstOHWithDetail" passed.
     
    OPatch succeeded.
    oracle>

    如果通过先决条件检查,您可以继续应用补丁,但如果失败,请采取必要措施,直到通过先决条件检查。

     

    步骤 4:关闭数据库

    为了最大限度地减少停机时间,您可以在调用opatch apply后关闭数据库,但只是为了明确指定,我为此创建了一个额外的步骤。

    一旦我们要修补的从 Oracle Home 运行的数据库关闭,请继续下一步。

    步骤 5:应用 OPatch

    导航到文件夹 32507738 并使用应用模式调用 OPatch。

    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
    oracle> $ORACLE_HOME/OPatch/opatch apply
    oracle> opatch apply
    Oracle Interim Patch Installer version 12.2.0.1.24
    Copyright (c) 2021, Oracle Corporation.  All rights reserved.
     
     
    Oracle Home       : /apps/oracle/server/12.2.0.1/dbhome_1
    Central Inventory : /apps/oracle/server/12.2.0.1/oraInventory
       from           : /apps/oracle/server/12.2.0.1/dbhome_1/oraInst.loc
    OPatch version    : 12.2.0.1.24
    OUI version       : 12.2.0.1.4
    Log file location : /apps/oracle/server/12.2.0.1/dbhome_1/cfgtoollogs/opatch/opatch2021-04-24_19-19-22PM_1.log
     
    Verifying environment and performing prerequisite checks...
    OPatch continues with these patches:   32507738
     
    Do you want to proceed? [y|n]
    y
    User Responded with: Y
    All checks passed.
     
    Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
    (Oracle Home = '/apps/oracle/server/12.2.0.1/dbhome_1')
     
     
    Is the local system ready for patching? [y|n]
    y
    User Responded with: Y
    Backing up files...
    Applying interim patch '32507738' to OH '/apps/oracle/server/12.2.0.1/dbhome_1'
    ApplySession: Optional component(s) [ oracle.swd, 12.2.0.1.0 ] , [ oracle.swd.opatchautodb, 12.2.0.1.0 ] , [ oracle.swd.oui, 12.2.0.1.0 ] , [ oracle.ons.cclient, 12.2.0.1.0 ] , [ oracle.ons.eons.bwcompat, 12.2.0.1.0 ] , [ oracle.network.cman, 12.2.0.1.0 ] , [ oracle.oid.client, 12.2.0.1.0 ] , [ oracle.rdbms.drdaas, 12.2.0.1.0 ] , [ oracle.ons.daemon, 12.2.0.1.0 ]  not present in the Oracle Home or a higher version is found.
     
    Patching component oracle.rdbms.util, 12.2.0.1.0...
     
    Patching component oracle.rdbms, 12.2.0.1.0...
     
    Patching component oracle.network.rsf, 12.2.0.1.0...
     
    Patching component oracle.rdbms.rsf, 12.2.0.1.0...
     
    Patching component oracle.ctx, 12.2.0.1.0...
     
    Patching component oracle.ctx.rsf, 12.2.0.1.0...
     
    Patching component oracle.dbdev, 12.2.0.1.0...
     
    Patching component oracle.dbtoolslistener, 12.2.0.1.0...
     
    Patching component oracle.duma, 12.2.0.1.0...
     
    Patching component oracle.has.common.cvu, 12.2.0.1.0...
     
    Patching component oracle.ldap.owm, 12.2.0.1.0...
     
    Patching component oracle.ldap.rsf, 12.2.0.1.0...
     
    Patching component oracle.nlsrtl.rsf, 12.2.0.1.0...
     
    Patching component oracle.oracore.rsf, 12.2.0.1.0...
     
    Patching component oracle.oraolap, 12.2.0.1.0...
     
    Patching component oracle.rdbms.dbscripts, 12.2.0.1.0...
     
    Patching component oracle.rdbms.deconfig, 12.2.0.1.0...
     
    Patching component oracle.rdbms.rsf.ic, 12.2.0.1.0...
     
    Patching component oracle.sdo, 12.2.0.1.0...
     
    Patching component oracle.sdo.locator, 12.2.0.1.0...
     
    Patching component oracle.sdo.locator.jrf, 12.2.0.1.0...
     
    Patching component oracle.tfa, 12.2.0.1.0...
     
    Patching component oracle.rdbms.dv, 12.2.0.1.0...
     
    Patching component oracle.assistants.acf, 12.2.0.1.0...
     
    Patching component oracle.xdk.parser.java, 12.2.0.1.0...
     
    Patching component oracle.assistants.deconfig, 12.2.0.1.0...
     
    Patching component oracle.xdk.rsf, 12.2.0.1.0...
     
    Patching component oracle.ons, 12.2.0.1.0...
     
    Patching component oracle.ons.ic, 12.2.0.1.0...
     
    Patching component oracle.rdbms.lbac, 12.2.0.1.0...
     
    Patching component oracle.xdk, 12.2.0.1.0...
     
    Patching component oracle.precomp.rsf, 12.2.0.1.0...
     
    Patching component oracle.rdbms.crs, 12.2.0.1.0...
     
    Patching component oracle.install.deinstalltool, 12.2.0.1.0...
     
    Patching component oracle.sqlplus.ic, 12.2.0.1.0...
     
    Patching component oracle.ldap.rsf.ic, 12.2.0.1.0...
     
    Patching component oracle.rdbms.oci, 12.2.0.1.0...
     
    Patching component oracle.rdbms.install.plugins, 12.2.0.1.0...
     
    Patching component oracle.ldap.client, 12.2.0.1.0...
     
    Patching component oracle.sqlplus, 12.2.0.1.0...
     
    Patching component oracle.assistants.server, 12.2.0.1.0...
     
    Patching component oracle.rdbms.rman, 12.2.0.1.0...
     
    Patching component oracle.precomp.lang, 12.2.0.1.0...
     
    Patching component oracle.precomp.common, 12.2.0.1.0...
     
    Patching component oracle.jdk, 1.8.0.91.0...
    Patch 32507738 successfully applied.
    Log file location: /apps/oracle/server/12.2.0.1/dbhome_1/cfgtoollogs/opatch/opatch2021-04-24_19-19-22PM_1.log
     
    OPatch succeeded.
    oracle>

    步骤 6:启动数据库

    启动您在 Step-5 中停止的数据库。数据库与所有 PDB 一起启动后,继续下一步应用数据补丁。

    步骤 7:应用数据补丁(SQL 补丁工具)

    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
    oracle> $ORACLE_HOME/OPatch/datapatch -verbose
    SQL Patching tool version 12.2.0.1.0 Production on Sat Apr 24 19:36:35 2021
    Copyright (c) 2012, 2021, Oracle.  All rights reserved.
     
    Log file for this invocation: /apps/oracle/server/12.2.0.1/cfgtoollogs/sqlpatch/sqlpatch_47601_2021_04_24_19_36_35/sqlpatch_invocation.log
     
    Connecting to database...OK
    Note:  Datapatch will only apply or rollback SQL fixes for PDBs
           that are in an open state, no patches will be applied to closed PDBs.
           Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation
           (Doc ID 1585822.1)
    Bootstrapping registry and package to current versions...done
    Determining current state...done
     
    Current state of SQL patches:
    Bundle series DBRU:
      ID 210420 in the binary registry and not installed in any PDB
     
    Adding patches to installation queue and performing prereq checks...
    Installation queue:
      For the following PDBs: CDB$ROOT PDB$SEED PDB112
        Nothing to roll back
        The following patches will be applied:
          32507738 (DATABASE APR 2021 RELEASE UPDATE 12.2.0.1.210420)
     
    Installing patches...
    Patch installation complete.  Total patches installed: 3
     
    Validating logfiles...
    Patch 32507738 apply (pdb CDB$ROOT): SUCCESS
      logfile: /apps/oracle/server/12.2.0.1/cfgtoollogs/sqlpatch/32507738/24169280/32507738_apply_CDB12_CDBROOT_2021Apr24_19_37_07.log (no errors)
    Patch 32507738 apply (pdb PDB$SEED): SUCCESS
      logfile: /apps/oracle/server/12.2.0.1/cfgtoollogs/sqlpatch/32507738/24169280/32507738_apply_CDB12_PDBSEED_2021Apr24_19_41_13.log (no errors)
    Patch 32507738 apply (pdb PDB112): SUCCESS
      logfile: /apps/oracle/server/12.2.0.1/cfgtoollogs/sqlpatch/32507738/24169280/32507738_apply_CDB12_PDB112_2021Apr24_19_41_13.log (no errors)
    SQL Patching tool complete on Sat Apr 24 19:46:11 2021
    oracle>

    就是这样,数据库已被修补。

    在此修补练习后检查任何无效对象,并在需要时使用 utlrp.sql 修复无效对象

    https://databaseinternalmechanism.com/2021/04/24/how-to-apply-release-update-12-2-0-1-210420-patch-32507738-april-2021-ru/

    喜欢请赞赏一下啦^_^

    微信赞赏

    支付宝赞赏

  • 相关阅读:
    利用 PHP 导出 Git 某个分支下,新增或修改过的文件
    [翻译] 10 个实用的 Git 高级命令
    Django web project
    install virtualenv
    js原型继承
    HTML 学习杂记
    IDEA 文件列表隐藏某后缀文件
    coocsCreator杂记
    mac install brew
    c编程:输入一个数字n,则n代表n行,每行输入2个数字a,b计算每行的a+b问题。
  • 原文地址:https://www.cnblogs.com/lkj371/p/14930837.html
Copyright © 2011-2022 走看看