Monday, September 1, 2008

Using export/import to change the character set in Oracle

When using export/import there are potentialy 3 points at which conversion can occur:
a. If the NLS_LANG on export defines a different character set than the  export database the characters are converted and the exportfile is written in the character set defined by the NLS_LANG.
b. If the NLS_LANG on import is different than the character set the export file was created in the data is converted by the import executable when it reads the export file.
c. If the NLS_LANG on import is different that the character set of the target database the data is converted when import inserts the data into  the database.

Because we only need to convert once it's usualy best to set the character  set part of the NLS_LANG to the character set of the source database. That way conversions (a) and (b) don't take place and the data is simply
converted into the target character set when import inserts it into that  database (conversion c).

No comments:

search engine

Custom Search