1.What is an Oracle GoldenGate Trail File?
Oracle GoldenGate Extract Process is like a video recorder. It reads the transaction data from the source databases and records the data in the Oracle GoldenGate trail files, which are like the video tapes which preserves the captured data so that Oracle GoldenGate can replay the transactions.
Oracle GoldenGate Trail File uses a proprietary binary format defined by Oracle GoldenGate. The trail file includes the database time zone, character set and metadata information needed by the replication. 
Next, let's discuss how to manage the trail files. I will discuss the following topics:
- Creating Trail Files
- Writing Data to Trail Files
- Purging Trail Files
- Checking Trail Files
2. Creating a Trail Files
When setting up an extract group, you need to specify the trail file name, and its size. The default size is 10 megabytes.
âDuring an Oracle GoldenGate implementation, you also need to estimate the total storage size for all your trail files. You can refer to the Oracle GoldenGate document (Oracle GoldenGate 11.2 Installation and Setup Guide, page 5) for more info. The typical estimation is:
3. Writing Data to Trail Files
When reading from redo logs, Oracle GoldenGate first keeps all the uncommitted transaction data in memory. After the transaction is committed, Oracle GoldenGate then writes the data to a trail file in large blocks. All the file names begin with the two characters and a unique, nine-digits serial (sequence) number from 000000000 through 999999999. For example, /ogg/dirdat/em000000001. When the trail sequence number reaches 999999999, the numbering starts over at 000000000.â
5. Purging the Trail Files
Trail files can accumulate quickly. You should consider regularly purge or archive the trail files to save the storage space. Oracle GoldenGate allows you to purge the trail file according to rules set with the PURGEOLDEXTRACTS parameter in the manager parameter file to purge trail files:
PURGEOLDEXTRACTS /ogg/dirdat/*, USECHECKPOINTS, MINKEEPDAYS 2
This setup means that Oracle GoldenGate will keep the trail files for at least for 2 days and the data has been applied to the targets
6. Checking the Trail Files
In general, you can check the trail files with the GGSCI command: