签到成功

知道了

CNDBA社区CNDBA社区

OGG-00446 Oracle GoldenGate Capture for Oracle, ext1.prm: No valid log files for current redo

2017-10-26 15:10 5733 0 原创 故障处理 GoldenGate
作者: leo

问题描述:

ORACLE RAC 配置OGG时,启动rac 的extract 进程时日志提示如下: http://www.cndba.cn/cndba/leo1990/article/2301http://www.cndba.cn/cndba/leo1990/article/2301http://www.cndba.cn/cndba/leo1990/article/2301http://www.cndba.cn/cndba/leo1990/article/2301

2017-10-25T23:55:10.619+0800  ERROR   OGG-00446  Oracle GoldenGate Capture for Oracle, ext1.prm:  error 2 (No such file or directory) opening redo log +DATA/orcl/archivelog/2_4_958301916.dbf for sequence 4Not able to establish initial position for begin time 2017-10-25 23:27:32.000000.
2017-10-25T23:55:10.620+0800  ERROR   OGG-01668  Oracle GoldenGate Capture for Oracle, ext1.prm:  PROCESS ABENDING.

造成该错误的原因是因为RAC的共享存储采用了ASM(自动存储管理),而OGG的抽取进程无法连接到ASM,故而无法抓取到redo log。

http://www.cndba.cn/cndba/leo1990/article/2301
http://www.cndba.cn/cndba/leo1990/article/2301http://www.cndba.cn/cndba/leo1990/article/2301
http://www.cndba.cn/cndba/leo1990/article/2301
http://www.cndba.cn/cndba/leo1990/article/2301

官方文档 ID 1061093.1

官方给出的错误提示:

To show how to recover from an extract failure when your Archive or Redo files are stored under ASM 
and you see one of the following messages

ERROR 118 No Valid Log File For Current Redo Sequence Xxxx, Thread Y

ERROR 500 No valid log files for current redo sequence X, thread Y, error retrieving redo file name for sequence X, archived = 0, use_alternate = 0 Not able to establish initial position for begin time YYYY-MM-DD HH:MI:SS

ERROR OGG-00446  error 2 (No such file or directory) opening redo log <log file name>.dbf for sequence ####
Not able to establish initial position for begin time YYYY-MM-DD HH:MI:SS

ERROR OGG-00446  No valid log files for current redo sequence 35194, thread 1, error retrieving redo file name for sequence 35194, archived = 0, use_alternate = 0 Not able to establish initial position for begin time 2014-03-25 15:55:47.000000.

官方给出的解决办法:

If you are running Oracle ASM, the problem may be that the ASM connection is either not defined or is incorrectly defined or TRANLOGOPTIONS DBLOGREADER needs to be added.  

If your archive files are ONLY under ASM and extract receives an error 500, extract may have run successfully until the process needed to read from the ARCHIVES instead of the REDO.

Once it needs to read from archive, the extract will fail.

Please add the following line, or correct it in your Extract parameter file, if you are On Oracle 11.2.0.2 or better, or 10.2.0.5 or better and using OGG 11.x:
TRANLOGOPTIONS DBLOGREADER
If the above version of Oracle or OGG doesn't apply to you specifying a user that can connect to the ASM instance and restart your Extract: 
TRANLOGOPTIONS ASMUSER <user>@<ASM_instance_name>, ASMPASSWORD <password>

具体解决办法如下:

1.在tnsnames.ora 文件中添加以下内容:

目的是为了extract进程能连到正确的ASM实例,host 每个节不一样http://www.cndba.cn/cndba/leo1990/article/2301

+ASM =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = rac2-vip)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = +ASM)
    )
  )

2.测试能否连接到正确的实例

[oracle@rac2 admin]$ sqlplus sys/oracle@+ASM as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Oct 26 03:33:47 2017

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options

SQL> set line 200
SQL> select instance_name,status from v$instance;

INSTANCE_NAME                     STATUS
------------------------------------------------ ------------------------------------
+ASM2                         STARTED

3.修改extract进程的配置

增加一行:
TRANLOGOPTIONS ASMUSER sys@+ASM,ASMPASSWORD oracle

以上步骤正确的话,启动extract 进程,数据正常同步。
GGSCI (rac2 as ogg@orcl2) 38> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING                                           
EXTRACT     RUNNING     DP1         00:00:00      00:00:05    
EXTRACT     RUNNING     EXT1        00:00:00      00:00:02

版权声明:本文为博主原创文章,未经博主允许不得转载。

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
leo

leo

关注

坚持你的坚持

  • 202
    原创
  • 0
    翻译
  • 39
    转载
  • 16
    评论
  • 访问:765327次
  • 积分:1270
  • 等级:核心会员
  • 排名:第8名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ