天天看點

ORACLE12C新引進的幾個patch工具

OPatchAuto 自動調用 datapatch 完成安裝資料庫的二進制更新檔并自動開始 post patch 的操作。

企業管理雲控制(Enterprise Manager Cloud Control)

從 12.1 版本開始,EMCC 現在調用 datapatch 來完成任何 12c 或者更高版本的資料庫更新檔及 post patch 的操作

更新腳本使用Catctl.pl來替代原來的catupgrd.sql,DBUA 現在在更新過程中也調用 Datapatch

Datapatch 與 OPatch 的最大差別是 OPatch 在資料庫關閉時執行,而 datapatch 是在資料庫是打開時完成其動作的。

請看一個簡單的示例:

[[email protected] OPatch]$ ls ---11G沒有datapatch這個工具。

crs   emdpatch.pl  ocm     opatchauto-dir  opatchdiag      opatch.ini         opatch.ini.ouibak.1  opatch.ini.ouibak.3  opatchprereqs  operr.bat         oplan       scripts

docs  jlib         opatch  opatch.bat      opatchdiag.bat  opatch.ini.ouibak  opatch.ini.ouibak.2  opatch.pl            operr          operr_readme.txt  README.txt  version.txt

[[email protected] OPatch]$ pwd

/u01/app/oracle/product/11.2.0.4/dbhome_2_patch/OPatch

[

[[email protected] ~]$ cd $ORACLE_HOME

[[email protected] dbhome_2_161223]$ ls

addnode     cdata        cv           dmu                     initzupgods1.ora  jdk   mgw      OPatch       owm      R         root.sh.old    root.sh.ouibak    sqlj      ucp

admin       cfgtoollogs  dbs          dv                      install           jlib  network  opmn         perl     racg      root.sh.old.1  root.sh.ouibak.1  sqlpatch  usm

apex        clone        dc_ocm       has                     instantclient     ldap  nls      oracore      plsql    rdbms     root.sh.old.2  root.sh.ouibak.2  sqlplus   utl

assistants  crs          deinstall    hostPreCheck.completed  inventory         lib   oc4j     oraInst.loc  plugins  relnotes  root.sh.old.3  scheduler         srvm      wwg

bin         css          demo         hs                      javavm            log   odbc     ord          precomp  rest      root.sh.old.4  slax              suptools  xdk

ccr         ctx          diagnostics  initzdtupgf1.ora        jdbc              md    olap     oui          QOpatch  root.sh   root.sh.old.5  sqldeveloper      sysman

[[email protected] dbhome_2_161223]$ cd OPatch/

[[email protected] OPatch]$ ls

auto       datapatch.bat  jlib     ocm         opatchauto.cmd  opatchdiag.bat  opatch.ini.ouibak    opatchprereqs  operr_readme.txt  plugins     version.txt

config     docs           jre      opatch      opatch.bat      opatch_env.sh   opatch.ini.ouibak.1  operr          oplan             README.txt

datapatch  emdpatch.pl    modules  opatchauto  opatchdiag      opatch.ini      opatch.pl            operr.bat      oracle_common     scripts

./datapatch -verbose

SQL Patching tool version 12.1.0.2.0 on Mon Feb 20 20:01:42 2017

Copyright (c) 2016, Oracle.  All rights reserved.

Log file for this invocation: /u02/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_267305_2017_02_20_20_01_42/sqlpatch_invocation.log

Connecting to database...OK

Bootstrapping registry and package to current versions...done

Determining current state...done

Current state of SQL patches:

Bundle series DBBP:

  ID 161223 in the binary registry and ID 161223 with errors in the SQL registry

Adding patches to installation queue and performing prereq checks...

Installation queue:

  Nothing to roll back

  The following patches will be applied:

    25145817 (FA DATABASE BUNDLE PATCH 12.1.0.2.161223 (25145817))

Installing patches...

Patch installation complete.  Total patches installed: 1

Validating logfiles...

Patch 25145817 apply: SUCCESS

  logfile: /u02/app/oracle/cfgtoollogs/sqlpatch/25145817/20875480/25145817_apply_ZUPGODS_2017Feb20_20_02_14.log (no errors)

SQL Patching tool complete on Mon Feb 20 20:08:12 2017