Exp/imp environment variable character set Conversion
Note: ensure that the client encoding is the same as the database encoding to avoid character conversion.
Other methods ensure that the exp client encoding is the same as the imp client encoding. If an imp or exp error occurs, you can export the log from exp to find the information. The following information is displayed:
Environment: Use exp/imp to upgrade and migrate the database from win 10.2.0.1 to linux11.2.0.3
Export log information from the source database Exp:
Connectedto: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0-64 bitProduction
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in US7ASCIIcharacter set and AL16UTF16 NCHAR character set
Server uses ZHS16GBK character set(Possiblecharset conversion)
We can see that the character set of the original library is ZH16GBK and the client code is US7ASCII.
Import log information of the new database Imp:
Exportfile created by EXPORT: V10.02.01 via conventional path
Import done in ZHS16GBKcharacter set and AL16UTF16 NCHAR character set
Export client uses US7ASCII character set (possible charset conversion)
Imp import client encoding: ZHS16GBK
In this way, data is imported into the new database.
Because the client encoding of the new database is the same as the character set of the database, character conversion is not performed and data is imported directly. This means that a character conversion occurs between the original database and its client during export, to import data correctly, we need to perform another character conversion at the import end, that is, set the client encoding at the import end:
NLS_LANG = AMERICAN_AMERICA.US7ASCII
In this way, it can be offset by two.