ogg参数:dblogreader

 转载:http://blog.itpub.net/25834554/viewspace-740788/ 

    上次客户的一套生产系统迁移到小机上,并且从原来的11.2.0.3的windows单机环境换成了11.2.0.3的RAC环境,数据库迁移完成后,显然goldengate也需要迁移过来,其实这个迁移就是重新配置一下。

原来的环境是:

Windows server 2008
GoldenGate version 11.1
Oracel version 11.2.0.3 (Single Instance)
File system for storing data

新环境:

IBM AIX6.1
GoldenGate version 11.2
Oracle version 11.2.0.3(RAC)
ASM for storing data

显然,在新环境上配置Extract进程的参数文件时,仅仅USERID username,PASSWORD password 是不够的,因为redo log 和archivelog均存储在ASM上,因此为了读取ASM上的redo log和archivelog还需要配置登陆ASM实例的登陆信息。

最初我的配置方法是:

首先在/u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora文件中添加:

ASM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.68.10.16)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.68.10.18)(PORT = 1521))
(LOAD_BALANCE = ON)
(FAILOVER = ON)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = +ASM)
)
)

其次在Extract进程参数文件中添加:

TranlogOptions ASMUser sys@ASM, ASMPassword Oracle123, convertucs2clobs, AltArchiveLogDest Instance DB1 +DG_FBA/db/arch,AltArchiveLogDest Instance DB2 +DG_FBA/db/arch

后来通过查询文档,发现有一个新的参数:dblogreader,有了这个参数之后,以上写法可以改写为:

TranlogOptions DBLOGREADER

可以发现比上面的写法简单多了,至少少了配置登陆ASM需要的TNS配置内容,并且也不在需要指定归档路径,其自动会找到归档日志的位置。

关于参数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.

你可能感兴趣的:(ogg参数:dblogreader)