pugna
全部博文(171)
分类: Oracle
2015-05-17 23:14:09
在前面我简单概述了一下goldengate 11.2.1的新特性,本文小结了一下两种Capture Mode
■Capture Mode 从OGG 11.2按本开始,对于Source为Oracle的数据库,Extract 支持classic capture 和 integrated capture mode两种模式:
●classic capture mode
就是以前用的那种从联机或归档日志中挖掘交易日志的方法
●integrated capture
OGG 11.2版本开始支持的新的挖掘交易日志的方法,不过对Oracle RDBMS的版本要求比较高,参见前面数据库要求中的说明.在这种模式下,Extract进程直接从database logmining server
接收数据变化的logical change records (LCR). 这种模式要求Oracle数据库必须处于归档模式下。
■Integrated capture mode的好处 ● Integrated capture mode 比classic capture mode支持的数据类型和功能更多,也更加透明。
● Because integrated capture is fully integrated with the database, no additional setup is required to work with Oracle RAC, ASM, and TDE.
● Integrated capture uses the database logmining server to access the Oracle redo stream, with the benefit of being able to automatically switch
between different copies of archive logs or different mirrored versions of the online logs. Thus integrated capture can transparently handle the
inavailability of a log file caused by disk corruption, hardware failure, or operator error, assuming that additonal copies of the archived and online
logs are available
● Integrated capture enables faster filtering of tables.
● Integrated capture handles point-in-time recovery and RAC integration more efficiently.
● Integrated capture features integrated log management. The Oracle Recovery Manager (RMAN) automatically retains the archive logs that are needed by Extract.
■Integrated capture mode的部署选择 local部署 :source database 和mining database是同一个库,这种模式下,无需额外配置
downstream部署 :source database 和mining database是同一平台的不同数据库,这种情况下,需要把source数据库的redo传输到mining database上来,需要额外的配置,
但会降低对source数据库的性能影响。downstream又分两种情况:一种是real-time mining,该方式下,个mining DB和Source DB一对一,同时需要在mining DB
上创建额外的standby redo log,接收源数据库借助Data Guard redo transport发送过的redo;另外一种是mining DB和Source DB和一对多的关系,不需要在mining DB
上创建standby redo log,这种情况下,所有的Extract都是从archived logs中挖掘数据。 混和部署 :For Oracle RDBMS 11.2.0.3 with the patch for bug 13560925, you can use either integrated capture, classic capture, or a combination
of the two modes. You can divide your tables between two or more Extracts in different capture modes depending on the attributes and data
types of the tables. The Oracle GoldenGate parameter files, trails, conversion capabilities, mapping options, and replication mechanisms
are fundamentally the same in both modes. ■两种模式之间的转换 ALTER EXTRACT 命令可以实现这两种模式之间的转换,前提是必须先用REGISTER EXTRACT 注册这个primary Extract group. REGISTER EXTRACT有2个用途(只能针对Priamry Extract Group) ● Enable integrated capture mode. ● Enable Extract in classic capture mode to work with Oracle Recovery Manager to retain the archive logs needed for recovery. Example 1 REGISTER EXTRACT ext01 LOGRETENTION Example 2 REGISTER EXTRACT ext01 DATABASE GGSCI (oggs) 7> info ext01 upgrade Extract EXT01 is ready to be upgraded to integrated capture. GGSCI (oggs) 8> 转换方法 o UPGRADE INTEGRATED TRANLOG 实现从classic capture mode 到 integrated capture mode ALTER EXTRACT finance, UPGRADE INTEGRATED TRANLOG o DOWNGRADE INTEGRATED TRANLOG 实现从integrated capture mode 到 classic capture mode ALTER EXTRACT finance, DOWNGRADE INTEGRATED TRANLOG ■Integrated capture mode调优建议 Integrated capture是通过logmining server在mining database对源数据库日志进行挖掘的,对资源的开销主要由2个部分组成:一是进程数,二是分配的Shared Memory.在OGG中通过
如下参数对这两个资源进行控制: TRANLOGOPTIONS INTEGRATEDPARAMS (max_sga_size 200, parallelism 3) 注:(1)max_sga_size的单位是M (2)Shared Memory从Streams pool中分配 (3)缺省情况下,一个integrated capture Extract分配的资源是(max_sga_size 1024, parallelism 2).所以如果在一个database中运行3个integrated capture Extract
的话,至少需要3G的Shared Memory,同时要考虑25%的内存预留,所以建议的stream_pool_size>=3 GB + (3 GB * 0.25) = 3.75 GB http://blog.itpub.net/785478/viewspace-1057471/