More about trail files

Trail files are used by Extract and Replicat processes; their primary role is for data persistence. You could argue that writing files to what could be deemed as a staging area is wasteful and suboptimal. Having said that, GoldenGate writes only the committed transactions to trail files in large blocks minimizing I/O. Furthermore, the architecture provides a guaranteed no data loss solution that is not to be underestimated.

The trail

By default, trail files are in the canonical format being unstructured, but with a header record. They are stored in the ./dirdat subdirectory under the GoldenGate Home. Each record contains the changed data and is of a variable record length. A trail can contain numerous trail files, each having a two-character prefix with a six-digit sequence number suffix.

An Extract process can write data to many trails. A Replicat can process data from only one trail. In classic mode, it is possible to configure multiple Replicat processes to handle the workload from that single trail.

For Oracle 12c multitenant container databases, one Extract supports multiple PDBs. However, only one Replicat can apply data to a target PDB.

Trail file purging

Trail files provide a temporary data storage. To clean up the processed trail files from a given trail to reduce disk space usage, configure the Manager process to delete consumed trail files. Although it is possible to add the PURGEOLDEXTRACTS parameter to Extract and Replicat parameter files, it is recommended that the Manager process controls the deletion of trail files centrally, thus preventing a process deleting files that are required by another process. The following example MGR.prm file illustrates this:

GGSCI (db12server01) 1> VIEW PARAMS MGR
-- GoldenGate Manager parameter file
PORT 7809
PURGEOLDEXTRACTS ./dirdat/lt*, USECHECKPOINTS, MINKEEPHOURS 1

The USECHECKPOINT option tells the Manager not to delete trail files until the Checkpoint confirms the file as processed. This is based on the checkpoints of both Extract and Replicat processes before purging. An additional option is the MINKEEPHOURS, which ensures that the checkpointed trail files are kept on disk for a minimum period (in hours).

When you operate in integrated capture mode, the Oracle database also keeps track of the archived redo logs that have been consumed by the target database. For example, RMAN will not delete archive logs that are still required for replication.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.32.230