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
EXTFILEfile_name
[, APPEND | PURGE] [, EXTENTS (primary
,secondary
,maximum
)] [, MAXFILESnum_files
] [, MEGABYTESnumber
] [, OWNER (group_number
,user_number
)] [, SECURE "[, FORMAT RELEASE major.minor] rwep
"]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.
-
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.
-
file_name
-
A physical file name or an existing define name of class map.
-
APPEND | PURGE
-
-
Specify
APPEND
to append to the file. -
Specify
PURGE
to purge the file.
-
-
EXTENTS
(primary
,secondary
,maximum
) -
Sets up the extent sizes and maximum extents for the file.
-
MAXFILES
num_files
-
Valid for Extract. Forces a sequence of files to be created, rather than a single file.
MAXFILES
permits up tonum_files
to be created as needed. Aged files are appended with a six-digit sequence number. When usingMAXFILES
,MEGABYTES
should also be specified in order to explicitly set the maximum size of each file in the sequence. -
MEGABYTES
number
-
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.
-
SECURE
"rwep
" -
Secures the file using standard Guardian security.
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");