DISCARDFILE | NODISCARDFILE
Valid For
Extract and Replicat
Description
Use the DISCARDFILE
parameter to do the following:
-
Customize the name, location, size, and write mode of the discard file. By default, a discard file is generated whenever a process is started with the
START
command through GGSCI. To retain the default properties, aDISCARDFILE
parameter is not required. -
Specify the use of a discard file for processing methods where the process starts from the command line of the operating system and a discard file is not created by default.
Use the NODISCARDFILE
parameter to disable the use of a discard file. If NODISCARDFILE
is used with DISCARDFILE
, the process abends.
When using DISCARDFILE
, use either the PURGE
or APPEND
option. Otherwise, you must specify a different discard file name before starting each process run, because Oracle GoldenGate will not write to an existing discard file without one of these instructions and will terminate.
See "DISCARDROLLOVER" for how to control how often the discard file is rolled over to a new file.
For more information about the discard file, see Administering Oracle GoldenGate.
Default
If a process is started with the START
command in GGSCI, it generates a discard file as follows:
-
The file is named after the process that creates it, with a
.dsc
extension. If the process is a coordinated Replicat, it generates one file per thread. Each file name is appended with the thread ID of the corresponding thread. -
The file is created in the
dirrpt
sub-directory of the Oracle GoldenGate installation directory. -
The maximum file size is 50 MB.
-
At startup, if a discard file exists, it is purged before new data is written.
-
The maximum filename is 250 characters including the directory.
When you start a process from the command line of the operating system, you should not generate a discard file by default.
Syntax
DISCARDFILE { [file_name] [, APPEND | PURGE] [, MAXBYTES n | MEGABYTES n] } | NODISCARDFILE
-
DISCARDFILE
-
Indicates that the name or other attribute of the discard file is being changed.
-
file_name
-
The relative or fully qualified name of the discard file, including the actual file name. For a coordinated Replicat, specify a file name of up to five characters, because each file name is appended with the thread ID of the thread that writes it. To store the file in the Oracle GoldenGate directory, a relative path name is sufficient, because Oracle GoldenGate qualifies the name with the Oracle GoldenGate installation directory.
-
APPEND
-
Adds new content to existing content if the file already exists. If neither
APPEND
norPURGE
is used, you must specify a different discard file name before starting each process run. -
PURGE
-
Purges the file before writing new content. If neither
PURGE
norAPPEND
is used, you must specify a different discard file name before starting each process run. -
MAXBYTES
n
-
Sets the maximum size of the file in bytes. The valid range is from 1 to 4096967295. The default is 3000000. If the specified size is exceeded, the process abends.
-
MEGABYTES
n
-
Sets the maximum size of the file in megabytes. The valid range is from 1 to 4096. The default is 3. If the specified size is exceeded, the process abends.
-
NODISCARDFILE
-
Prevents the process from creating a discard file.
Example
- Example 1
-
This example specifies a non-default file name and extension, non-default write mode, and non-default maximum file size. This example shows how you could change the default properties of a discard file for an online (started through GGSCI) process or specify the use of a discard file for a process that starts from the command line of the operating system and has no discard file by default.
DISCARDFILE .dirrpt/discard.txt, APPEND, MEGABYTES 20
- Example 2
-
This example changes only the write mode of the default discard file for an online process (started through GGSCI).
DISCARDFILE .dirrpt/finance.dsc, APPEND
- Example 3
-
This example disables the use of a discard file for an online process (started through GGSCI).
NODISCARDFILE