EXTFILE
Valid for
Extract, Replicat
Description
Use EXTFILE when Extract writes to an Oracle GoldenGate trail that contains a single file. EXTFILE defines the name, dimensions, and security of a file in the Oracle GoldenGate trail. The parameter file must include at least one EXTFILE or EXTTRAIL entry. EXTFILE must precede the names of files and tables containing data you want to extracted into the file.
All FILE and TABLE entries after the current entry but before the next EXTFILE, EXTTRAIL, RMTFILE, or RMTTRAIL parameter result in output to the current trail.
The trail must contain record headers or an error is returned at run-time.
Syntax
EXTFILE file_name [, APPEND | PURGE] [, EXTENTS (primary, secondary, maximum)] [, MAXFILES num_files] [, MEGABYTES number] [, OWNER (group_number, user_number)] [, SECURE " rwep"] [, FORMAT RELEASE major.minor] [, ENCRYPTTRAIL (<AES>, KEYNAME <name>) ]
FORMAT
RELEASE major.minor: Specifies the trail format of the data
that is sent by Extract to a trail, file, or (if a remote task). The value
tells the reader process whether the data records are of a version that it
supports. The format depends on the version of the Oracle GoldenGate
process. Newer Oracle GoldenGate versions contain different characteristic
than older ones.
-
FORMATis a required keyword -
RELEASEspecifies an Oracle GoldenGate release version. major is the major versionnumber, 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 12.1 through the current Oracle GoldenGate X.x version number, for example 12.1, 21.1, 23.1. 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.
-
file_name -
A physical file name or an existing define name of class map.
-
APPEND | PURGE -
-
Specify
APPENDto append to the file. -
Specify
PURGEto purge the file.
-
-
EXTENTS(primary,secondary,maximum) -
Sets up the extent sizes and maximum extents for the file.
-
MAXFILESnum_files -
Valid for Extract. Forces a sequence of files to be created, rather than a single file.
MAXFILESpermits up tonum_filesto be created as needed. Aged files are appended with a six-digit sequence number. When usingMAXFILES,MEGABYTESshould also be specified in order to explicitly set the maximum size of each file in the sequence. -
MEGABYTESnumber -
Sets up the maximum size of the file, or sequence of files if you specified
MAXFILES. The maximum size of each file is 2 gigabytes. -
OWNER(group_number,user_number) -
Gives ownership of the file to a different owner. Securing a file is useful when you extract logical sets of records to different files (for example, accounting data to one and sales data to another), and only want the sales group to have access to sales information.
Example
The following example illustrates how the EXTFILE parameters work in conjunction with the file and table parameters. This example extracts data owned by the EAST region into one file and data owned by WEST into another.
EXTFILE $DATA1.EXTRACT.EAST, OWNER (100,255),
SECURE "GGGG", PURGE
TABLE $DATA5.SALES.ORDERS WHERE (REGION = "EAST");
TABLE $DATA5.ACCTING.RECEIPTS WHERE (REG = "E");
EXTFILE $DATA1.EXTRACT.WEST, OWNER (200,255),
SECURE "GGGG", PURGE
TABLE $DATA5.SALES.ORDERS WHERE (REGION = "WEST");
TABLE $DATA5.ACCTING.RECEIPTS WHERE (REG = "W");
ENCRYPTTRAIL <GGS> | <AES>, KEYNAME
<name>) : Extract Only, See ENCRYPTTRAIL | NOENCRYPTTRAIL.