OGG_Trail文件的概述

Overview of trails

To support the continuous extraction and replication of databasechanges, Oracle

GoldenGate stores the captured changes temporarily on disk in aseries of files called a

trail. A trail can exist on the source or target system, or on anintermediary system,

depending on how you configure Oracle GoldenGate. On the localsystem it is known as an

extract trail (or local trail). On a remote system it is known as aremote trail.

By using a trail for storage, Oracle GoldenGatesupports data accuracy and fault tolerance

(see “Overview of checkpoints” on page 16). The use of a trail alsoallows extraction and

replication activities to occur independently of each other. Withthese processes separated,

you have more choices for how data is delivered. For example,instead of extracting and

replicating changes continuously, you could extract changescontinuously but store them

in the trail for replication to the target later, whenever thetarget application needs them.

 

为了支持extractionand replication数据更改的连续性,OracleGoldenGate 抓取了这些更改并存放在磁盘上的文件叫做Trail文件。Trail文件可以在源端或者目标端,或者是转换的系统里,取决于你怎样去配置Oracle GoldenGate。在local system的叫做extract trail文件 或者local trail 文件,在remote system就叫做remote trail文件。

         通过使用trail文件存储,OracleGoldenGate 可以支持精确的数据同步和故障处理。Trail文件可以在源端和目标端分别独立的使用。因为这些进程是分隔的,所以你也有很多传送数据的选择。比如你可以在源端抓取这些变化的数据,但是先存储起来,一会再传送给目标端。

 

 

 

Processes that write to, and read, a trail

The primary Extract process writes to a trail. Only one Extractprocess can write to a trail.

Processes that read the trail are:

● Data-pumpExtract: Extracts data from a local trail for further processing, if needed,

and transfers it to the target system or to the next OracleGoldenGate process

downstream in the Oracle GoldenGate configuration.

● Replicat:Reads a trail to apply change data to the target database.

 

Processes that write to, and read, a trail

一个Extract进程只能写一个Trail文件。

以下两个进程可以读Trail文件:

● Data-pumpExtract: 抓取本地的Trail文件,也可以传送给目标端数据库。

● Replicat:在目标端的数据库读取被传过来Trail文件,然后去应用。

 

 

 

Trail maintenance

Trail files are created as needed during processing, and they areaged automatically to

allow processing to continue without interruption for filemaintenance. By default, trails

are stored in the dirdat sub-directory of the Oracle GoldenGatedirectory.

By default, each file in a trail is 10 MB in size. All file names ina trail begin with the same

two characters, which you assign when you create the trail. As filesare created, each name

is appended with a unique, six-digit serial (sequence) number from000000 through

999999, for example c:\ggs\dirdat\tr000001. When the trail sequencenumber reaches 999999,

the numbering starts over at 000000.

You can create more than one trail to separate the data fromdifferent objects or

applications. You link the objects that are specified in a TABLE orSEQUENCE parameter to a

trail that is specified with an EXTTRAIL or RMTTRAIL parameterin the Extract parameter file.

Aged trail files can be purged byusing the Manager parameter PURGEOLDEXTRACTS.

 

 

 

Trail maintenance

Trail文件是在进程运行时被创建的,在不中断的情况下也可以进行维护,默认的Trail文件存放在Oracle GoldenGate目录中的dirdat子目录中。

默认每个文件大小为10MB。文件名的命名规则:文件名=两个字符+六个数字,其中两个字符可以自己设定,六个数字是系统自动的从000000到999999的序列数。比如c:\ggs\dirdat\tr000001。当Trail文件名的序列数超过了999999的时候,就又从000000开始。

对于不同的对象和程序可以创建多个Trail文件来存放。你可以用EXTTRAIL or RMTTRAIL参数来指定表或者队列存放的extract参数。

针对上述做一个代码说明:“GGSCI(oggsource.localdomain) 15> add EXTTRAIL  ./dirdat/r1, extract ext_demo,megabytes100”   这个就是增加了EXTTRAIL参数, 指定要被提取的trail文件存放在./dirdat目录下,文件名是r1 (系统会自动在其后面补6个序列数),用的extract进程是ext_demo,文件大小是100m。

可以在Manager进程中定义PURGEOLDEXTRACTS参数来清除过期的Trail文件(“过期” 这个期限可以自己设定 比如“PURGEOLDEXTRACTS ./dirdat/*,usecheckpoints, minkeepdays 7”   就是清除dirdat目录下所有超过7天的文件)。

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值