Exp/imp environment variable character set Conversion

Source: Internet
Author: User

 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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.