Answer: Please check if the source DB has characters that is not supported by the target DB.
- Running replication from Oracle Database to Teradata
- The trail file from the source is in UTF-8.
- The target database in Teradata is UTF-16.
(Analysis) The problem is that the target database character set is a subset of the source database character set. In this case, Teradata doesn't implement all the valid Unicode code points, for example, the default substitution character for invalid UNICODE in Oracle Database is U+FFFD and it's not recognized by Teradata.
(Solution) The followings are the steps to use CHARMAP:
- If source and target are same character set like map UTF-16 to UTF-16, you have to enable strict character validation. Add following parameter to replicat parameter. In this case, you don't have to use this.
REPLACEBADCHAR FORCECHECK - Create character mapping override definition file. Example bellow is source is Oracle AL32UTF8 column and target is UTF-16 and maps U+FFFD to U+0020 white space.
SOURCECHARSET AL32UTF8
TARGETCHARSET UTF-16
\xef\xbf\xbd \x20
Notes: the mapping has to be created correctly based on source and target character set. - Specify above override definition file in replicat parameter. Example bellow above file is saved as ./dirprm/fffd.map
- Please add the parameter before MAP parameter. Prefer before login parameter in case the conversion happens upon login for DB connection.
CHARMAP ./dirprm/fffd.map