goldengate安装补丁opatch

        因项目需要通过Restful API对ogg进行监控,在执行create datastore报错WARNING OGG-01933 Datastore create failed,发现是因为bug的原因。所以才有这遍安装补丁的文档。下面介绍goldengate安装过程。

一、升级opatch

1、官网下载最新的opatch,查看mos的文档 ID 224346.1

[oracle@PBYKJHD3:/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
[oracle@PBYKJHD3:/u01/app/ggs]$ 

2、提示和oui版本不兼容,重新下载11里面的最新版本。

[oracle@PBYKJHD3:/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
[oracle@PBYKJHD3:/u01/app/ggs]$ 

3、opatch已经能够正常用运行,但是查看inventory有错误,根据报错提示应该是找不到ogg的home目录,检查inventory.xml文件确实没有配置,手动添加以下内容<HOME NAME="OraHome1" LOC="/u01/app/ggs" TYPE="O" IDX="3"/>

[oracle@PBYKJHD3:/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后重新运行检查,已经显示正常。

[oracle@PBYKJHD3:/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
[oracle@PBYKJHD3:/u01/app/ggs]$ export ORACLE_HOME=/u01/app/ggs
[oracle@PBYKJHD3:/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.
[oracle@PBYKJHD3:/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、解压补丁,切换到补丁目录

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

5、应用补丁安装

[oracle@PBYKJHD3:/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.
[oracle@PBYKJHD3:/u01/app/ggs/26993295]$ 

6、检查是否正常。

[oracle@PBYKJHD3:/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.
[oracle@PBYKJHD3:/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进程。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值