RAC环境下抽取进程报错:OGG-00446 Oracle GoldenGate Capture for Oracle

1.说明

源库是RAC,在启动抽取进程时出现错误。无法正常启动,报错如下.

2.OGG日志

**2018-07-31 14:11:34  ERROR   OGG-00446  Oracle GoldenGate Capture for Oracle, ext01.prm:  
error 2 (No such file or directory) opening redo log +DATA/cndba/archivelog/1_255_965830339.dbf 
for sequence 255Not able to establish initial position for begin time 2018-07-31 14:00:23.
2018-07-31 14:11:34  ERROR   OGG-01668  Oracle GoldenGate Capture for Oracle, ext01.prm:  PROCESS ABENDING.**

3.错误原因

由于归档日志存在ASM磁盘组中,而OGG进程无法连接到ASM实例读取归档日志,从而导致启动失败。有两个解决办法:

  1. 办法一:通过ASM用户连接ASM实例读取归档日志
    请参考:
    https://www.cndba.cn/leo1990/article/2301
  2. 方法二:向ext01配置文件中添加如下条目,比前一种方法更简单
tranlogoptions dblogreader

官方文档对这个参数解释:

(Oracle)Valid for Extract in classic capture mode. Causes Extract to use a newer ASM API that is available
as of Oracle 10.2.0.5 and later10gR2 versions and Oracle 11.2.0.2 and later 11gR2 versions(but not in
Oracle 11gR1 versions). This API uses the database server to access the redo log and archive logs, instead
of connecting directly to the Oracle ASM instance.The database must contain the libraries that contain the
API modules and must be running
To use this feature,the Extract database user must have SELECT ANY TRANSACTION privilege.

详细如下:

	GGSCI (rac1) 20> view params ext01

	EXTRACT ext01
	SETENV (ORACLE_HOME = "/u01/oracle/11.2.0/db_1")
	SETENV (ORACLE_SID = "cndba1" )
	USERID ogg, PASSWORD ogg
	THREADOPTIONS MAXCOMMITPROPAGATIONDELAY 20000
	EXTTRAIL ./dirdat/et
	DYNAMICRESOLUTION
	DDL INCLUDE ALL
	tranlogoptions dblogreader

	TABLE test.*;

然后启用参数ENABLE_GOLDENGATE_REPLICATION

	SQL> ALTER SYSTEM SET ENABLE_GOLDENGATE_REPLICATION = TRUE SCOPE=BOTH;
	System altered.

你可能感兴趣的:(OGG)