Tuesday, June 19, 2012

How does the character set affect Import/Export in Oracle

Import and Export are client products, in the same way as SQL*Plus or Oracle Forms, and will therefore translate characters from the database character set to that defined by NLS_LANG. The character set used for the export will be stored in the export file and when the file is imported, the import will check the character set that was used. If it is different than that defined by NLS_LANG at the import site, the characters will be translated to the import character set and then, if necessary to the database character set.

Oracle recommends setting the character set part of the NLS_LANG environment variable to the same character set as the character set of the database you are using.

This query can help you to check the NLS_CHARACTERSET on the SOURCE database

SQL> select * from nls_database_parameters ;

Before running Oracle imp to import data set the NLS_LANG set to AMERICAN_AMERICA.WE8MSWIN1252 (=source NLS_CHARACTERSET)

On Unix this would be: export NLS_LANG=AMERICAN_AMERICA.WE8MSWIN1252;
On Windows this would be: C:\>set NLS_LANG=AMERICAN_AMERICA.WE8MSWIN1252;





No comments:

Post a Comment