GoldenGate常见错误及解决方法之一

本文总结了Oracle GoldenGate在不同场景下遇到的问题及其解决方案,包括权限不足导致的ORA-01031错误、配置缺失引发的ORA-26947错误、ASM文件访问失败及丢失归档日志等问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

系列一:
Oracle GoldenGate系列:使用Oracle ASM API DBLOGREADER时遇ora-01031错误

 

今天在自己新搭建的 Oracle ACFS 文件系统上测试 GoldenGate ,启动 extract 进程报如下错误:

 

2013-08-27 14:58:39  ERROR   OGG-00446  Opening ASM file +FRA/rac/archivelog/2013_08_27/thread_1_seq_84.357.824568733 in DBLOGREADER

 mode: (1031) ORA-01031: insufficient privileges

Not able to establish initial position for begin time 2013-08-27 14:49:49.

2013-08-27 14:58:39  ERROR   OGG-01668  PROCESS ABENDING.

 

查看 extract 进程参数

GGSCI (rac1.oracle.com) 46> view params escottEXTRACT escottSETENV (NLS_LANG=AMERICAN_AMERICA.AL32UTF8)USERID ggs, PASSWORD registerCACHEMGR, CACHESIZE 128MBTRANLOGOPTIONS DBLOGREADEREXTTRAIL ./dirdat/aaTABLE scott.s_emp;TABLE scott.s_dept;

Oracle GoldenGate extract 进程访问 asm 中存放的 transaction log 主要有2种方式:

1、以 sys 或 sysdba 权限直接连接 ASM 实例访问

2、在 Oracle 10.2.0.5、Oracle 11.2.0.2 以上版本的数据库中,Oracle 提供了一个新的 asm API ,可以让 extract 进程直接利用

数据库服务器来访问 redo 和 archive log。使用该 API 后,extract 将获得一个最大不超过 4 mb 的read buffer。read buffer 越大

,对于 redo 量较高的 环境越容易提高 Extract 的进程。可以通过使用 TRANLOGOPTIONS 的 DBLOGREADERBUFSIZE 选项来指定

read buffer 的大小。

按照本例中错误的描述,使用 DBLOGREADER API 可能需要某种数据库权限,这里可能正是缺少该权限才导致报错,查阅官方文档发现:

给 ggs 用户授予 select any transaction 后,进程启动正常。


系列二:本机环境
Oracle Server - Enterprise Linux Enterprise Linux Server release 5.7 (Carthage)
Database - Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
OGG - Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230_FBO


source端的提取进程extract启动后很快就变成stop状态,启动失败。

GGSCI (node1) 41> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     STOPPED     DP1         00:00:00      00:43:06
EXTRACT     STOPPED     EX1         00:00:00      00:01:41


查看错误日志

GGSCI (node1) 42> view report ex1

***********************************************************************
                 Oracle GoldenGate Capture for Oracle
    Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230_FBO
   Linux, x64, 64bit (optimized), Oracle 11g on Apr 23 2012 08:42:16

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

                    Starting at 2014-09-28 14:32:44
***********************************************************************

…..略去….

2014-09-28 14:33:06  ERROR   OGG-00446  Opening ASM file +DATA/prod/onlinelog/group_1.261.859325521 in DBLOGREADER mode: (26947) ORA-26947: Oracle GoldenGate
replication is not enabled.
Not able to establish initial position for begin time 2014-09-28 14:31:42.

2014-09-28 14:33:06  ERROR   OGG-01668  PROCESS ABENDING.


此次遇上了Oracle11.2.0.4所需的一个配置ENABLE_GOLDENGATE_REPLICATION。之前在11.2.0.3版本Oracle运行OGG从来没遇到过这个状况。在source端执行下面的语句问题解决。

ALTER SYSTEM SET ENABLE_GOLDENGATE_REPLICATION = TRUE SCOPE=BOTH;



系列三:

goldengate 从oracle asm 中增量同步数据时,出现下述错误.

 ERROR   OGG-00446  No valid log files for current redo sequence 367, thread 1, error retrieving redo file name
for sequence 367, archived = 0, use_alternate = 0Not able to establish initial position for begin time 2013-03-27 15:32:46.

 ERROR   OGG-01668  PROCESS ABENDING.

在抽取进程的参数文件中加入TRANLOGOPTIONS DBLOGREADER即可。

参考:Extract fail due to an ASM connection configuration issue [ID 1061093.1]

Applies to:

Oracle GoldenGate - Version 11.1.1.0.0 and later
Information in this document applies to any platform.

Goal

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

Fix

If you are running Oracle ASM, the problem may be that the ASM connection is either not defined or is incorrectly defined or TRANSLOGOPTINS 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>

 


系列四:

今天启动一个extract时,出现以下错误:

2011-10-16 22:41:02  ERROR   OGG-00446  Oracle GoldenGate Capture for Oracle, e430rks2.prm:  Could not find archived log for sequence 10770 thread 1 under default destinations SQL <SELECT  name    FROM v$archived_log   WHERE sequence# = :ora_seq_no AND         thread# = :ora_thread AND         resetlogs_id = :ora_resetlog_id AND         archived = 'YES' AND         deleted = 'NO>, error retrieving redo file name for sequence 10770, archived = 1, use_alternate = 0Not able to establish initial position for sequence 10770, rba 78960656.
2011-10-16 22:41:02  ERROR   OGG-01668  Oracle GoldenGate Capture for Oracle, e430rks2.prm:  PROCESS ABENDING.

原因是extract 所需的archived log已经被清走,不在log_archive_dest指定的目录下,解决方法很简单,只要把sequence 从10770开始到当前的archived log重新拷贝回log_archive_dest目录下即可。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24162410/viewspace-1811915/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/24162410/viewspace-1811915/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值