天天看點

goldengate安裝更新檔opatch

        因項目需要通過Restful API對ogg進行監控,在執行create datastore報錯WARNING OGG-01933 Datastore create failed,發現是因為bug的原因。是以才有這遍安裝更新檔的文檔。下面介紹goldengate安裝過程。

一、更新opatch

1、官網下載下傳最新的opatch,檢視mos的文檔 ID 224346.1

[[email protected]:/u01/app/ggs]$ OPatch/opatch lsinventory

OPatch Version : 12.2.0.1.21
  OUI  Version : 11.2.0.3.0
The OPatch version is not applicable for current OUI version.

Since OUI Version starts with 11.2, Please go to 'My Oracle Support' and get right OPatch 11.2.*.*.* based on patch 6880880, release version 11.2.0.0.0 and appropriate platform.

OPatch failed with error code 19
[[email protected]:/u01/app/ggs]$ 
           

2、提示和oui版本不相容,重新下載下傳11裡面的最新版本。

[[email protected]:/u01/app/ggs]$ OPatch/opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.25
Copyright (c) 2020, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/ggs
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/ggs/oraInst.loc
OPatch version    : 11.2.0.3.25
OUI version       : 11.2.0.3.0
Log file location : /u01/app/ggs/cfgtoollogs/opatch/opatch2020-08-17_10-12-43AM_1.log

List of Homes on this system:

  Home name= OraGI12Home1, Location= "/u01/app/12.1.0/grid"
  Home name= OraDB12Home1, Location= "/u01/app/oracle/product/12.1.0/dbhome_1"
LsInventorySession failed: RawInventory gets null OracleHomeInfo

OPatch failed with error code 73
[[email protected]:/u01/app/ggs]$ 
           

3、opatch已經能夠正常用運作,但是檢視inventory有錯誤,根據報錯提示應該是找不到ogg的home目錄,檢查inventory.xml檔案确實沒有配置,手動添加以下内容

<HOME NAME="OraHome1" LOC="/u01/app/ggs" TYPE="O" IDX="3"/>

[[email protected]:/u01/app/ggs]$ vi /u01/app/oraInventory/ContentsXML/inventory.xml
<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2014, Oracle and/or its affiliates.
All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
   <SAVED_WITH>12.1.0.2.0</SAVED_WITH>
   <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OraGI12Home1" LOC="/u01/app/12.1.0/grid" TYPE="O" IDX="1" CRS="true">
   <NODE_LIST>
      <NODE NAME="pbykjhd1"/>
      <NODE NAME="pbykjhd2"/>
      <NODE NAME="pbykjhd3"/>
      <NODE NAME="pbykjhd4"/>
   </NODE_LIST>
</HOME>
<HOME NAME="OraHome1" LOC="/u01/app/ggs" TYPE="O" IDX="3"/>
<HOME NAME="OraDB12Home1" LOC="/u01/app/oracle/product/12.1.0/dbhome_1" TYPE="O" IDX="2">
   <NODE_LIST>
      <NODE NAME="pbykjhd1"/>
      <NODE NAME="pbykjhd2"/>
      <NODE NAME="pbykjhd3"/>
      <NODE NAME="pbykjhd4"/>
   </NODE_LIST>
</HOME>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>
           

4、設定環境變量ORACLE_HOME後重新運作檢查,已經顯示正常。

[[email protected]:/u01/app/ggs]$ OPatch/opatch lsinventory

OPatch Version : 11.2.0.3.25
  OUI  Version : 12.1.0.2.0
The OPatch version is not applicable for current OUI version.

Since OUI Version starts with 12.1, Please go to 'My Oracle Support' and get right OPatch 12.1.*.*.* based on patch 6880880, release version 12.1.0.0.0 and appropriate platform.

OPatch failed with error code 19
[[email protected]:/u01/app/ggs]$ export ORACLE_HOME=/u01/app/ggs
[[email protected]:/u01/app/ggs]$ OPatch/opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.25
Copyright (c) 2020, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/ggs
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/ggs/oraInst.loc
OPatch version    : 11.2.0.3.25
OUI version       : 11.2.0.3.0
Log file location : /u01/app/ggs/cfgtoollogs/opatch/opatch2020-08-17_10-24-49AM_1.log

Lsinventory Output file location : /u01/app/ggs/cfgtoollogs/opatch/lsinv/lsinventory2020-08-17_10-24-49AM.txt
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: PBYKJHD3
ARU platform id: 226
ARU platform description:: Linux x86-64

Installed Top-level Products (1): 

Oracle GoldenGate Core                                               12.2.0.0.0
There are 1 products installed in this Oracle Home.


Interim patches (1) :

Patch  26018605     : applied on Tue May 16 10:05:13 CST 2017
Unique Patch ID:  21264674
   Created on 8 May 2017, 14:48:34 hrs PST8PDT
   Bugs fixed:
     21254311, 22628312, 22466155, 21562399, 22910007, 22642576, 25096792
     24826961, 24804392, 22912874, 24302758, 24414523, 23733399, 22959377
     23514258, 21548970, 22266611, 23058710, 24744349, 24598011, 23755469
     21131090, 22478792, 22830589, 22295723, 22993705, 23102612, 22458470
     21888279, 23750747, 23267559, 22295940, 22730188, 24439762, 23661056
     23607346, 23641740, 23499047, 22352402, 23751229, 24345528, 22514172
     23478103, 23587474, 21425179, 23763062, 23067041, 24359320, 23275654
     23479013, 21763449, 22046726, 23133585, 22004485, 23608765, 24752349
     25292368, 23108041, 22455149, 24310901, 21452073, 23580290, 24657396
     22257964, 22888353, 21805148, 21481506, 23328064, 20656312



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

OPatch succeeded.
[[email protected]:/u01/app/ggs]$ 
           

二、安裝更新檔

1、關閉所有goldengate的程序。

2、關閉mgr程序

/u01/app/12.1.0/grid/bin/agctl stop goldengate oggapp

3、根據更新檔文檔裡面的步驟進行安裝

設定ORACLE_HOME為ogg的home目錄

export ORACLE_HOME=/u01/app/ggs
           

4、解壓更新檔,切換到更新檔目錄

[[email protected]:/u01/app/ggs]$unzip p26993295_12201170221_Linux-x86-64.zip
[[email protected]:/u01/app/ggs]$ cd 26993295
[[email protected]:/u01/app/ggs/26993295]$ ls
etc  files
[[email protected]:/u01/app/ggs/26993295]$
           

5、應用更新檔安裝

[[email protected]:/u01/app/ggs/26993295]$ /u01/app/ggs/OPatch/opatch apply
Oracle Interim Patch Installer version 11.2.0.3.25
Copyright (c) 2020, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/ggs
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/ggs/oraInst.loc
OPatch version    : 11.2.0.3.25
OUI version       : 11.2.0.3.0
Log file location : /u01/app/ggs/cfgtoollogs/opatch/opatch2020-08-17_10-38-38AM_1.log

Verifying environment and performing prerequisite checks...

The following patch(es) are duplicate patches with patches installed in the Oracle Home.
 [ 26993295]
Incoming patch(es) are better patch(es) with higher UPI(s) or later version(s).
OPatch would rollback installed patches and apply the better ones.


Conflicts/Supersets for each patch are:

Patch : 26993295

        Better duplicate of 26018605


Patches [   26018605 ] will be rolled back.

OPatch continues with these patches:   26993295  

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 = '/u01/app/ggs')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '26993295' to OH '/u01/app/ggs'
Rolling back interim patch '26018605' from OH '/u01/app/ggs'

Patching component oracle.oggcore.ora12c, 12.2.0.0.0...

The following actions have failed:
Copy failed from '/u01/app/ggs/.patch_storage/26018605_May_8_2017_14_48_34/files//ggsci' to '/u01/app/ggs/ggsci'... 


Do you want to proceed? [y|n]
y
User Responded with: Y
RollbackSession removing interim patch '26018605' from inventory


OPatch back to application of the patch '26993295' after auto-rollback.


Patching component oracle.oggcore.ora12c, 12.2.0.0.0...
Patch 26993295 successfully applied.
OPatch Session completed with warnings.
Log file location: /u01/app/ggs/cfgtoollogs/opatch/opatch2020-08-17_10-38-38AM_1.log

OPatch completed with warnings.
[[email protected]:/u01/app/ggs/26993295]$ 
           

6、檢查是否正常。

[[email protected]:/u01/app/ggs]$ OPatch/opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.25
Copyright (c) 2020, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/ggs
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/ggs/oraInst.loc
OPatch version    : 11.2.0.3.25
OUI version       : 11.2.0.3.0
Log file location : /u01/app/ggs/cfgtoollogs/opatch/opatch2020-08-17_10-40-58AM_1.log

Lsinventory Output file location : /u01/app/ggs/cfgtoollogs/opatch/lsinv/lsinventory2020-08-17_10-40-58AM.txt
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: PBYKJHD3
ARU platform id: 226
ARU platform description:: Linux x86-64

Installed Top-level Products (1): 

Oracle GoldenGate Core                                               12.2.0.0.0
There are 1 products installed in this Oracle Home.


Interim patches (1) :

Patch  26993295     : applied on Mon Aug 17 10:39:19 CST 2020
Unique Patch ID:  21680777
   Created on 25 Oct 2017, 15:57:01 hrs PST8PDT
   Bugs fixed:
     21254311, 22628312, 22466155, 21562399, 22910007, 22642576, 25096792
     24826961, 24804392, 22912874, 24302758, 24414523, 23733399, 22959377
     23514258, 21548970, 22266611, 23058710, 24744349, 24598011, 23755469
     21131090, 22478792, 22830589, 22295723, 22993705, 23102612, 22458470
     21888279, 23750747, 23267559, 22295940, 22730188, 24439762, 23661056
     23607346, 23641740, 23499047, 22352402, 23751229, 24345528, 22514172
     23478103, 23587474, 21425179, 23763062, 23067041, 24359320, 23275654
     23479013, 21763449, 22046726, 23133585, 22004485, 23608765, 24752349
     25292368, 23108041, 22455149, 24310901, 21452073, 23580290, 24657396
     22257964, 22888353, 21805148, 21481506, 23328064, 20656312



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

OPatch succeeded.
[[email protected]:/u01/app/ggs]$ ./ggsci

Oracle GoldenGate Command Interpreter for Oracle
Version 12.2.0.1.170221 26865020_FBO
Linux, x64, 64bit (optimized), Oracle 12c on Oct 20 2017 17:18:42
Operating system character set identified as UTF-8.

Copyright (C) 1995, 2017, Oracle and/or its affiliates. All rights reserved.



GGSCI (PBYKJHD3) 1>
           

7、啟動恢複ogg程序。

繼續閱讀