Oracle view the character set in the imp exported file

Source: Internet
Author: User
During exp import, we often encounter the issue of inconsistent warning characters. The following describes how to configure the nls_lang parameter during impexp import and export. Oracle recommends that the configuration of nls_lang be consistent with that of databasenls_character when executing exp, so as to avoid character conversion problems and improve exp efficiency. View d

During exp import, we often encounter the issue of inconsistent warning characters. The following describes how to configure the nls_lang parameter during imp/exp import and export. It is recommended that the configuration of nls_lang be consistent with that of database nls_character when executing exp, so as to avoid character conversion problems and improve exp efficiency. View d

During exp import, we often encounter the issue of inconsistent warning characters. The following describes how to configure the nls_lang parameter during imp/exp import and export.

It is recommended that the configuration of nls_lang be consistent with that of database nls_character when executing exp, so as to avoid character conversion problems and improve exp efficiency. View database nls_character

SQL> select value from nls_database_parameters where parameter = 'nls _ CHARACTERSET ';

VALUE
------------------------------
ZHS16GBK
Here we only check the character set of the exported exp file.

$ Echo $ NLS_LANG

$
$ Exp userid = scott/Oracle file = '/tmp/scott. dmp' log = '/tmp/scott. Log'

Export: Release 11.2.0.3.0-Production on Thu Aug 30 13:07:22 2012

Copyright (c) 1982,201 1, Oracle and/or its affiliates. All rights reserved.


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in US7ASCII character set and AL16UTF16 NCHAR character set
Server uses ZHS16GBK character set (possible charset conversion)
. Exporting pre-schema procedural objects and actions
. Exporting foreign function library names for user SCOTT
. Exporting PUBLIC type synonyms
. Exporting private type synonyms
. Exporting object type definitions for user SCOTT
About to export SCOTT's objects...
. Exporting database links
. Exporting sequence numbers
. Exporting cluster definitions
. About to export SCOTT's tables via Conventional Path...
.. Exporting table BONUS 0 rows exported
EXP-00091: Exporting questionable statistics.
.. Exporting table DEPT 4 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
.. Exporting table EMP 14 rows exported
EXP-00091: Exporting questionable statistics.
EXP-00091: Exporting questionable statistics.
.. Exporting table SALGRADE 5 rows exported
EXP-00091: Exporting questionable statistics.
. Exporting synonyms
. Exporting views
. Exporting stored procedures
. Exporting operators
. Exporting referential integrity constraints
. Exporting triggers
. Exporting indextypes
. Exporting bitmap, functional and extensible indexes
. Exporting posttables actions
. Exporting materialized views
. Exporting snapshot logs
. Exporting job queues
. Exporting refresh groups and children
. Exporting dimensions
. Exporting post-schema procedural objects and actions
. Exporting statistics
Export terminated successfully with warnings.
The above prompt shows that the database character set is ZHS16GBK, while the client character set in my client's nls_lang is US7ASCII.

The following shows the character set of the exported/tmp/scott. dmp file.

$ Imp userid = scott/Oracle file = '/tmp/scott. dmp' show = yes

Import: Release 11.2.0.3.0-Production on Thu Aug 30 13:07:58 2012

Copyright (c) 1982,201 1, Oracle and/or its affiliates. All rights reserved.


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

Export file created by EXPORT: V11.02.00 via conventional path
Import done in US7ASCII character set and AL16UTF16 NCHAR character set
Import server uses ZHS16GBK character set (possible charset conversion)
Import done in US7ASCII character set and AL16UTF16 NCHAR character set
Import server uses ZHS16GBK character set (possible charset conversion)

In the import done line, the client character set is US7ASCII, and the character set at the import and export end is the same.

The import server line indicates that the character set of the imported database is ZHS16GBK. Because the character set is different, Character Set conversion may occur.

The following prompt appears when the exp client is different from the imp client:

$ Export NLS_LANG = AMERICAN_AMERICA.ZHS16GBK
$ Echo $ NLS_LANG
AMERICAN_AMERICA.ZHS16GBK
$ Imp userid = scott/Oracle file = '/tmp/scott. dmp' show = yes

Import: Release 11.2.0.3.0-Production on Thu Aug 30 13:11:53 2012

Copyright (c) 1982,201 1, Oracle and/or its affiliates. All rights reserved.


Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0-64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

Export file created by EXPORT: V11.02.00 via conventional path
Import done in ZHS16GBK character set and AL16UTF16 NCHAR character set
Export client uses US7ASCII character set (possible charset conversion)
Import done in ZHS16GBK character set and AL16UTF16 NCHAR character set
Export client uses US7ASCII character set (possible charset conversion)

The export client line indicates that the character set of the exported client is US7ASCII.

For more details, see the official documentation NLS considerations in Import/Export-Frequently Asked Questions [ID 227332.1].

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.