Character set in Oracle 11g r2 XE

2019-08-28 01:00发布

问题:

I have an exported data using exp command from a full Oracle 11gR2 database that has the AR8MSWIN1256 charset. However, when I import the data into an 11gR2 XE database, I get the error:

row rejected due to ORACLE error 12899

Could the problem be the mismatch in charsets (AL32UTF8 vs AR8MSWIN1256)? If so, is there a solution?

回答1:

the table almost certainly has length semantics BYTE for the character columns. imp creates the table with the same length semantics as they were in the source database. So if you want to migrate to a multibyte character set you need to make sure that the length semantics of those columns are changed to character.

Easiest is to pre-create the tables and make sure that your column definitions don't specify their length in bytes but in characters.