Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

With the non Oracle database (MySQL and MSSQL),  the connections are set to  use Unicode only (UTF-8 for MySQL and UTF-16 for MSSQL) - and then the data is converted according to NCHARSET to the format expected by the target db connection.

Replicating data between environments having different character set can be tricky sometimes, we have to make sure the columns having values other than the default character values( For example columns having Chinese characters) are handled properly. Conflicts will occur during these scenarios .

Note

Below is a example.

Source characterset : ZHT16MSWIN950
Target Characterset : AL32UTF8
Datatype for the column in source : CHAR(100)

Initial replication fails with error "Error: ORA-12899: value too large for column "SCOTT"."TAB2"."COL2" (actual: 106, maximum: 100)"

After changing the target to CHAR(150) the replication runs fine. But when value is deleted in source the conflict arises again for zero rows conflict since it
is not able to find the value in the target.

The solution for the problem is specifying datatype using NCHAR or NVARCHAR , we can also use length using "CHAR(100 CHAR)" . It says it should fit 100 characters, not 100 bytes. This should avoid any issues with character sets.