暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

Oracle GoldenGate Trail File

原创 Anbob 2013-03-20
1403
Trail files are generated by both the original extract and the Data Pump (extract) process. Trail files are read by the Data Pump (extract) and Replicat (replicat) processes.
The trail files generated by the original extract and the Data Pump vary a little. Some processing appears to be postponed until the Data Pump stage. Some additional file URIs are added to the trail header by the Data Pump. Also the primary keys for some UPDATE statements appear to be modified by the Data Pump process.
The trail files are binary, though significant portions are stored in ASCII. You would need to encrypt the trail files to prevent someone with operating system access examining the contents using the strings utility. Presumably to ensure interoperability across operating systems and databases, all numbers are stored in ASCII format, making the trail files even less secure than other formats such as Oracle exports which at least store numbers using the Oracle internal representation.
The trail file contains a file header and a file body. The file header contains one header record. The file body can contain zero or more data records.
Each record has a four byte record header. A record can contain zero or more sub records. Each sub record also has a four byte record header. The design allows for infinite levels of sub records, nested recursively.

Record Header


Each record header contains four bytes. The following table shows the structure.
















Byte#0123
DescriptionTypeFlagLength

The research was performed in Oracle 11.2.0.3 on OEL 5.6 running in VirtualBox. The Oracle GoldenGate version was 11.2.1.0.1

File Structure


The following illustration shows and overview of the structure of a trail file:
# File header
# Record
46 00 04 2A # Type=46 (F) Flag=0 Len=1066
...... # Data
5A 00 04 2A # Type=5A (Z) Flag=0 Len=1066
# File body
# Record
47 01 00 3A # Type=47 (G) Flag=1 Len=58
...... # Data
5A 01 00 3A # Type=5A (Z) Flag=1 Len=58
File Header
The file header is identified by a record header with type 0×46 (F).
The file header is terminated by a record header with type 0×59 (Z). The length field of the terminator record header is identical to the length field of the original record header.
File Body
The file body consists of zero or more records. Each record is identified by a record header with type 0×47 (G).
Each record is terminated by a record header with type 0×59 (Z). The length field of the terminator record header is identical to the length field of the original record header.
File Header
The file header contains a number of sub records
The file header generated by the extract process is generally around 1050 bytes in size. The file header generated by the data pump process is larger as it includes additional records. The size of the file header will vary according to the configuration is it includes several variable length fields such as process names and directory names.
The file header has five sub records. Each sub record contains further sub records nested within it.
 
 
refrences     http://juliandyke.wordpress.com/2013/03/16/oracle-goldengate-trail-internals-2/
 
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论