SOURCECHARSET
Valid For
Replicat
Description
Use the SOURCECHARSET
parameter to control the conversion of data from the source character set to the target character set by Replicat. Replicat converts character sets by default for versions 11.2.1 and later, but you may need to intervene in the following cases:
-
To enable accurate conversion of data written by an Extract version earlier than 11.2.1. Extract versions prior to version 11.2.1 do not write information about the source character set to the trail, so the information must be supplied to Replicat directly. Extract versions 11.2.1 and later write information about the source character set to the trail for use by Replicat, and any
SOURCECHARSET
specification is ignored. -
To override the source database character set in the trail file. Use
SOURCECHARSET
with theOVERRIDE
option to specify the character set you want to use. An example use case is migrating a database to UNICODE or particular character set database from garbage in, garbage out type of non-character set aware database by ignoring the source database character set.
Replicat issues a warning message when it uses the SOURCECHARSET
character set.
Use the REPLACEBADCHAR parameter to handle validation errors where there are invalid characters in the source data or the target character set does not support a source character. It provides options to abend on these errors, skip the record that caused the error, or specify a substitute value for the character.
Default
None
Syntax
SOURCECHARSET {source_charset | PASSTHRU | OVERRIDE} [DB2ZOS]
-
source_charset
-
Specifies the source character set for data that is written by an Extract version that is earlier than 11.2.1. Replicat uses the specified character set when converting character-type columns to the target character set.
For
source_charset
, specify the appropriate character-set identifier that represents the source database.For Oracle, if
SOURCECHARSET
is not specified but there is anNLS_LANG
environment variable on the target, Replicat uses theNLS_LANG
value as the source database character set. If neitherSOURCECHARSET
norNLS_LANG
is present, Replicat abends to prevent possible data corruption. -
PASSTHRU
-
PASSTHRU
Forces Replicat to apply the data without converting the character set. Character set differences are ignored as follows:
-
If the database is Oracle, the data is applied the way it is stored in the trail.
-
If the database is other than Oracle, the data is applied as binary data if the database supports a bind as binary data. Otherwise, the data is applied as-is.
If
PASSTHRU
is specified and a mapping betweenCHAR/VARCHAR/CLOB
andNCHAR/NVARCHAR/NCLOB
exists in theMAP
statement, Replicat abends.If any Oracle GoldenGate column-mapping functions are used for character-based columns when
PASSTHRU
mode is specified, Replicat issues a warning message and converts the results of those functions to the target database character set before mapping them to the target column.PASSTHRU
should only be used if you are certain the source and target character sets are compatible. If you are not sure whetherPASSTHRU
is appropriate in your environment, contact Oracle Support before using it. -
-
OVERRIDE
-
Forces Replicat to use the specified character set thus overriding the source database character set in the trail file. This option overrides character type column character set except in the following cases:
-
The character set is overridden by the
CHARSET
andCOLCHARSET
parameters. -
Use of
NCHAR
,NVARCHAR
andNCLOB
data types. -
The database overrides the column character set explicitly to a set other than the database character set.
-
-
DB2 for z/OS
-
Valid for DB2 for z/OS.
Required if the version of a trail that contains DB2 data from the z/OS platform is Oracle GoldenGate 12.1 or lower. This parameter ensures that Replicat recognizes that the data is from DB2 for z/OS, which permits a mix of ASCII and EBCDIC character formats.