goldengate一些参数整理(二)

2015-07-24 06:56:08 · 作者: · 浏览: 1
作,缺省为复制 GETUPDATEAFTERS | IGNOREUPDATEAFTERS 是否读取后影像,缺省为读取 GETUPDATEBEFORES | IGNOREUPDATEBEFORES 是否读取前影像,缺省为不读取 GETTRUNCATES | IGNORETRUNCATES 是否复制truncate操作,缺省为不复制 allownoopupdates 允许执行无实际变化的update。例如,update a=a会纪录一条update,但是没有后影像,无法正确构筑where语句 REPERROR 定义出错以后replicat的响应,一般可以定义为两种:Abend,即一旦出现错误即停止复制,此为缺省配置;Discard,出现错误后继续复制,只把错误的数据放到discard文件中。 DISCARDFILE 定义出错数据的输出文件。当数据出现错误后,可以用于查找错误原因 discardfile /oradata/goldengate/dirrpt/repsz.dsc,append, megabytes 10 HANDLECOLLISIONS 自动过滤重复时段的数据冲突,用于不能停机执行初始化。打开该参数后不会将数据错误报到discard文件中。 DYNAMICRESOLUTION 使replicat动态解析表的结构,加快启动速度。缺省为每次启动解析所有要复制表的结构 SQLEXEC 调用存储过程或者执行sql语句。可以将返回值作为依据进行过滤条件,或者用户改变session变量。 GROUPTRANSOPS 将小的交易合并成为一个大的交易进行提交,减少提交次数,降低系统IO消耗。 MAXTRANSOPS 将大交易拆分,每若干条纪录提交一次 maxtransops 1000 BATCHSQL 针对批处理中针对某个表的大批量重复操作进行优化,提高批处理的处理速度。 DBOPTIONS 定义与数据库类型相关的特殊处理方式。 NUMFILES 定义进程中表的最大数据量,缺省为 500. PURGEOLDEXTRACTS 定义自动删除队列,一般建议在mgr进程配置。
错误定位时经常使用下面三个参数: nodynsql
nobinarychars
showsyntax
DYNSQL | NODYNSQL Valid for Replicat Use the DYNSQL and NODYNSQL parameters to control the way that SQL statements are formed. With NODYNSQL, Replicat uses literal SQL statements with the bind variables resolved. With DYNSQL, the default, Replicat uses dynamic SQL to compile a statement once, and then execute it many times with different bind variables. ● Statement with DYNSQL: UPDATE ... WHERE ID = :B ● Statement with NODYNSQL: UPDATE
... WHERE ID = ‘1234’ In most environments, using DYNSQL yields the best efficiency and most throughput. However, in isolated instances, using NODYNSQL has proven faster and more efficient. Try NODYNSQL only if Replicat throughput appears unsatisfactory. Do not use DYNSQL when replicating to target databases that do not support dynamic SQL. When using NODYNSQL, you must also use the NOBINARYCHARS parameter。 Oracle GoldenGate for MySQL does not support LOB replication in NODYNSQL mode. Default DYNSQL Syntax DYNSQL | NODYNSQL
BINARYCHARS | NOBINARYCHARS Valid for Extract and Replicat Use BINARYCHARS and NOBINARYCHARS to control whether character data is treated as binary data or null-terminated strings. BINARYCHARS, the default, maintains data the way it was entered in the source table. This ensures proper processing in cases when a column in the source or target database is defined as a character column and it is possible that binary characters could be entered into that column. BINARYCHARS is not compatible with the BULKLOAD parameter (direct-bulk load); use NOBINARYCHARS. NOBINARYCHARS can cause Oracle GoldenGate to interpret a binary character to be the end of the data in that column. If there is more data after the binary data, it is not processed by Oracle GoldenGate, compromising data integrity. NULL characters cause this to happen, as well as any character defined with the DELIMITER option of FORMATASCII. Unless there is good reason to use NOBINARYCHARS, leaving the default set to BINARYCHARS is recommended so that data is maintained the way it was entered in the source table. Before using NOBINARYCHARS, contact Oracle Support. BINARYCHARS and NOBINARYCHARS are table-specific. One parameter remains in effect for all subsequent TABLE or MAP statements until the other is encountered. Default BINARYCHARS Syntax BINARYCHARS | NOBINARYCHARS
SHOWSYNTAX Valid for Replicat Use the SHOWSYNTAX parameter to start an interactive session where you can view each Replicat SQL statement before it is applied. By v