A-A+

OGG-ALO模式配置(Extracting from Oracle Archive log files)

2013年10月11日 DG&RAC&OGG 暂无评论 阅读 3,815 次

公司新的整体架构将会用到OGG ALO模式,下图即就是使用到该架构的部分

ogg_alo

即就是,先从2个节点的rac通过dg灾备数据到adg库中,再将数据从adg的库中通过OGG同步到第三个数据集中的库中。

相关配置如下:

主库添加所有表的表级日志模式执行

alter table test.test3 add supplemental log data (all) columns;
alter table test.YALLONKING add supplemental log data (all) columns;

adg上设置归档路径

SQL> alter system set log_archive_dest_1 = "location=/home/oracle/arch";  

System altered.

SQL> alter system set standby_archive_dest='/home/oracle/arch';

System altered.

源端抓取进程

EXTRACT e_test
SETENV (ORACLE_SID=rac_adg)
USERID ogg@RACDB_1 password ogg
RMTHOST 192.168.137.214, MGRPORT 7809
RMTTRAIL ./dirdat/l1
DISCARDFILE ./dirrpt/e_test.dsc, APPEND
REPORTCOUNT EVERY 30 MINUTES, RATE
TRANLOGOPTIONS ARCHIVEDLOGONLY
TRANLOGOPTIONS ALTARCHIVELOGDEST /home/oracle/arch
TRANLOGOPTIONS ALTARCHIVEDLOGFORMAT %t_%s_%r.dbf
THREADOPTIONS PROCESSTHREADS EXCEPT 2		--此处是排除节点2,只从节点1接收日志
FETCHOPTIONS, NOUSESNAPSHOT, NOUSELATESTVERSION, MISSINGROW REPORT
STATOPTIONS REPORTFETCH
TABLE test.*;

注:此处由于本人在自己的笔记本上跑整个架构,故只开启了rac的第一个节点,所以配置了参数[THREADOPTIONS PROCESSTHREADS EXCEPT 2],且将rac的cluster_database 参数设为false。

目标端replication配置

REPLICAT rp_test
SETENV (ORACLE_SID=ora11gr2)
USERID ogg, PASSWORD ogg
AssumeTargetDefs
AllowNoopUpdates
ReportCount Every 30 Minutes, Rate
Report at 01:00
ReportRollover at 01:15
DiscardFile dirrpt/rp_test.dsc, Append
DiscardRollover at 02:00 ON SUNDAY
Map test.*, Target yallonking.*;

ALO Restrictions:
* Log resets (RESETLOG) cannot be done on the source database after the standby database is created.
* To replicate DDL when Extract is in ALO mode, Extract must have permission to maintain a SQL*Net connection to the source database.
* ALO cannot be used on a standby database if the production system is Oracle RAC and the standby database is non-RAC. In addition to both systems being Oracle RAC, the number of nodes on each system must be identical.
* ALO on RAC requires a dedicated connection to the source server. If that connection is lost, Oracle GoldenGate processing will stop.
* Supplemental logging at the table level and the database level must be enabled for the tables from the source database.

标签:

给我留言

Copyright © YallonKing 保留所有权利.   Theme  Ality

用户登录

分享到: