Checkpoint
复制目标
Local System
Multiple Remote Systems
One to many GoldenGate Trails
数据源
Which Tables
Which Rows and Columns
Which Operations
数据影射和变换
table参数:
Syntax:
TABLE <file name>
[, WHERE (<where condition>)]
[, FILTER (<expression>)]
[, KEYCOLS (<key column specification>)]
[, COLS (<column>) | [ , <column> ]) ]
[, COLSEXCEPT (<column>) | [ , <column> ]) ]
[, FETCHCOLS (<column>) | [ , <column> ]) ]
[, FETCHCOLSEXCEPT (<column>) | [ , <column> ]) ]
[, SQLEXEC <clause> ]
[, FETCHBEFOREFILTER ]
[, SQLPREDICATE “WHERE <clause>” ]
[, COLMAP (<column mapping specification>)]
[, <record type filter>, <record type filter>, …]
;
注意:TABLE的结尾有一个分号。
2、完整示例
参数文件举例:日志抽取进程
extract extsz
userid goldengate, password *******
--REPORT AT 01:59
--reportrollover at 02:00
--transmemory directory (/backup/goldengate/dirtmp,8G,4G),ram 2G,transram 500M
tranlogoptions rawdeviceoffset 0
--warnlongtrans 12h, checkintervals 30m
exttrail /backup/goldengate/dirdat/sz
dynamicresolution
numfiles 2000
tableexclude ctais2.TMP_*;
tableexclude ctais2.BAK_*;
tableexclude ctais2.MLOG$_*;
tableexclude ctais2.RUPD$_*;
tableexclude ctais2.KJ_*;
table ctais2.*;
参数文件举例:传输进程
extract dpesz
setenv ( NLS_LANG = AMERICAN_AMERICA.ZHS16GBK )
passthru
REPORT AT 01:59
reportrollover at 02:00
transmemory directory (/backup/goldengate/dirtmp,8G,4G), ram 2G,transram 500M
--threadoptions iolatencydelay 3000
rmthost 99.16.1.12,mgrport 7809, compress
rmttrail /oradata/goldengate/dirdat/sz
dynamicresolution
numfiles 3000
table ctais2.*;
示例3:
extract extl --抽取进程名
userid ddw,password ddw --连接本机DB的帐号密码
rmthost 192.168.0.44, mgrport 7801 --目标数据库服务器地址和GG服务端口号
rmttrail d:\tools\GG\gg10g\dirdat\rl --远程队列的位置
dynamicresolution --优化参数,动态分析表结构
gettruncates --抓取truncate数据
table ddw.aatest; --需要抽取的表,可以使用通配符
3、全部可选参数
(1)通用参数
CHECKPARAMS Verifies parameter file syntax.
如果加入该参数,表示下次运行只是检查一下语法,并不实际运行进程。 注意:该命令只能检查一些简单语法,并不能保证参数文件是完全正确的。
COMMENT | -- Denotes comments in a parameter file. ##注释行,也可以用两个中划线--代替.--checkparams表示本行已经被注释掉
ETOLDFORMAT Generates trails in a format that is compatible with Replicat versions prior to Oracle GoldenGate version 6.0.
GETENV Retrieves variables that were set with the SETENV parameter.
SETENV Specifies a value for a UNIX environment variable from within the GGSCI interface.
针对extract进程设定系统环境变量。
示例:SETENV (NLS_LANG="AMERICAN_AMERICA.UTF8") --设置字符集环境变量为UTF8