6.46 DEFSFILE

Valid For

DEFGEN

Description

Use the DEFSFILE parameter to identify the name of the file to which DEFGEN will write data definitions. By default, the data definitions file is written in the character set of the local operating system. You can change the character set with the CHARSET option.

For more information about definitions files, see Administering Oracle GoldenGate.

Default

None

Syntax

DEFSFILE file_name [APPEND | PURGE] [CHARSET character_set] [FORMAT RELEASE major.minor]
file_name

The relative or fully qualified file name. The file is created when you run DEFGEN.

APPEND

Directs DEFGEN to write new content (from the current run) at the end of any existing content, if the specified file already exists. If the definitions file already exists, but is of an older Oracle GoldenGate release version, you can set the FORMAT RELEASE option to the same version as the existing file to prevent errors. Otherwise, DEFGEN will try to add newer metadata features and abend. The following are the restrictions when using APPEND:

  • If the existing data definitions file is in a format older than Oracle GoldenGate 11.2.1, DEFGEN appends the table definitions in the old format, where table and column names with multi-byte and special characters are not supported.

  • If the existing data definitions file is in the newer format introduced in version 11.2.1, DEFGEN appends the table definitions in the existing character set of the file.

  • If the existing file is from version 11.2 or earlier, it was written when DEFGEN did not support three-part object names and will cause an error if the new metadata contains three-part names. You can specify objects from an Oracle container database if you remove the container or catalog portion by using the NOCATALOG parameter in the DEFGEN parameter file.

PURGE

Directs DEFGEN to purge the specified file before writing new content from the current run. When using PURGE, you can overwrite an existing definitions file that was created by an older version of DEFGEN with newer metadata that supports newer features, such as three-part object names.

CHARSET character_set

Generates the definitions file in the specified character set. Without CHARSET, the default character set of the operating system is used. If APPEND mode is specified for a definitions file that is version 11.2.1 or later, CHARSET is ignored, and the character set of the existing definitions file is used.

FORMAT RELEASE major.minor

Specifies the metadata format of the definitions that are sent by DEFGEN to the definitions file. The metadata tells the reader process whether the file records are of a version that it supports. The metadata format depends on the version of the Oracle GoldenGate process. Older Oracle GoldenGate versions contain different metadata than newer ones. Use FORMAT when the definitions file will be used by a process that is of an older Oracle GoldenGate version than the current one.

  • FORMAT is a required keyword.

  • RELEASE specifies an Oracle GoldenGate release version. major is the major version number, and minor is the minor version number. The X.x must reflect a current or earlier, generally available (GA) release of Oracle GoldenGate. Valid values are 9.0 through the current Oracle GoldenGate X.x version number, for example 11.2 or 12.1. (If you use an Oracle GoldenGate version that is earlier than 9.0, specify either 9.0 or 9.5.)

    The release version is programmatically mapped back to an appropriate internal compatibility level. The default is the current version of the process that writes to this trail. Note that RELEASE versions earlier than 12.1 do not support three-part object names.

Example

DEFSFILE ./dirdef/orcldef CHARSET ISO-8859-11 FORMAT RELEASE 11.2