You can use the CHARMAP feature in Oracle GoldenGate 12.1.2.1.0 and later versions. The CHARMAP allows you to specify that a character mapping for GoldenGate replicat to override the default character mapping. You can use this feature to converted to unsupported character to avoid errors.
Tip: Performance Consideration
By enabling character set conversion for same character sets, you may encounter performance degradation.
By enabling character set conversion for same character sets, you may encounter performance degradation.
The following is an example replication from Oracle Database to Teradata with the following setup:
To void the errors, you can take the described steps shown as follows:
1) If source and target are same character set like map UTF-16 to UTF-16, you need to enable strict character validation by adding the following parameter to replicat parameter file:
REPLACEBADCHAR FORCECHECK
2) Create character mapping override definition file (saved as ./dirprm/fffd.map). The following example maps source Oracle AL32UTF8 to target UTF-16, and maps character U+FFFD to character U+0020 (white space).
SOURCECHARSET AL32UTF8
TARGETCHARSET UTF-16
\xef\xbf\xbd \x20
3) Specify the created override definition file in replicat parameter file. The following is an example:
CHARMAP ./dirprm/fffd.map
Please add the parameter before MAP parameter and before the database login parameter in case the conversion needs login for DB connection.
The CHARMAP supported by Oracle GoldenGate replicat for all supported databases including Oracle GoldenGate for DB2 LUW, Oracle GoldenGate for iSeries, Oracle GoldenGate for DB2 z/OS etc.
- The trail file from the source is in UTF-8.
- The target database in Teradata is UTF-16.
To void the errors, you can take the described steps shown as follows:
1) If source and target are same character set like map UTF-16 to UTF-16, you need to enable strict character validation by adding the following parameter to replicat parameter file:
REPLACEBADCHAR FORCECHECK
2) Create character mapping override definition file (saved as ./dirprm/fffd.map). The following example maps source Oracle AL32UTF8 to target UTF-16, and maps character U+FFFD to character U+0020 (white space).
SOURCECHARSET AL32UTF8
TARGETCHARSET UTF-16
\xef\xbf\xbd \x20
3) Specify the created override definition file in replicat parameter file. The following is an example:
CHARMAP ./dirprm/fffd.map
Please add the parameter before MAP parameter and before the database login parameter in case the conversion needs login for DB connection.
The CHARMAP supported by Oracle GoldenGate replicat for all supported databases including Oracle GoldenGate for DB2 LUW, Oracle GoldenGate for iSeries, Oracle GoldenGate for DB2 z/OS etc.