2.164 TRAILBYTEORDER

Valid For

GLOBALS

Description

Use the TRAILBYTEORDER parameter in the GLOBALS file to set the byte format of the metadata in the trails or files created with the EXTFILE, EXTTRAIL, RMTFILE, and RMTTRAIL parameters. By default, Extract always writes the trail metadata in big endian byte order, regardless of the byte order of the source or target machine.

This parameter affects only the metadata of the trail records. It does not affect the column data.

When used in the GLOBALS file, TRAILBYTEORDER affects all of the files or trails in the same Oracle GoldenGate instance. To specify the byte order of a specific trail or file, use the TRAILBYTEORDER option of the associated EXTFILE, RMTFILE, EXTTRAIL, or RMTTRAIL parameter in the Extract parameter file. In cases where Extract writes to multiple trails or files on different platforms, TRAILBYTEORDER in the Extract parameter file enables the correct byte ordering of each one. When TRAILBYTEORDER is used as an Extract parameter, it overrides any TRAILBYTEORDER specification in the GLOBALS file.

TRAILBYTEORDER reduces the overhead of conversion work when the source and target machines both use little endian. In this case, because the default without TRAILBYTEORDER is BIGENDIAN, the conversion work must be performed from little endian to big endian (to write to trail) and then from big endian to little endian to read the trail on the target. TRAILBYTEORDER prevents unnecessary conversions by allowing you to specify the byte order that is used by both the source and target machines (LITTLEENDIAN) as the byte order of the trail.

In the case where the source byte order is big endian and the target is little endian, where some conversion is required, you can decide whether the conversion takes place at the source or at the target. To perform the conversion on the source, set TRAILBYTEORDER to LITTLEENDIAN. The trail is converted to little endian, and no conversion is needed on the target. To perform the conversion on the target, leave the default set to BIGENDIAN. If the target system of the trail is big endian, TRAILBYTEORDER is not needed, because the default is big endian.

Use the NATIVEENDIAN option for a primary Extract or a data pump if the byte order of the source machine is not known, but you want to keep that format and do not want conversion performed on the source. If nothing is specified with TRAILBYTEORDER, a data pump writes the trail using the same byte order as the input trail, which may not be the desired format.

TRAILBYTEORDER is valid for files that have a FORMAT RELEASE version of at least 12.1. For older versions, this parameter is ignored.

Do not use TRAILBYTEORDER when replicating data to a NonStop system. On the NonStop platform, Oracle GoldenGate only supports BIGENDIAN, the default.

To identify the byte order of the metadata in a trail, use the ENV command of the Logdump utility.

Default

BIGENDIAN

Syntax

TRAILBYTEORDER {BIGENDIAN | LITTLEENDIAN | NATIVEENDIAN}
BIGENDIAN

Formats the trail metadata in big endian.

LITTLEENDIAN

Formats the trail metadata in little endian.

NATIVEENDIAN

Formats the trail metadata in the default byte order of the local system. Enables you to make certain the output trail is converted to the native format of the source machine.

Example

TRAILBYTEORDER LITTLEENDIAN