Tuesday 22 May 2012

Converting to AL32UTF8 Character Set from the Oracle Default of WE8MSWIN1252


Scenario

Current database uses WE8MSWIN1252 we need to migrate new database uses AL32UTF8 encoding.

Method Opted:
Export/Import you can use data pump utility to do the same

STEPS:
1) Explicitly set the NLS_LANG enviornment variable to the characterset of the source database.

#export NLS_LANG=AMERICAN_AMERICA.WE8MSWIN1252

2) Export the source database with export utility .take export backup using full option

#exp system/sys file=orcl_full.dmp log=orcl_full.log full=y consistent=y statistics=none buffer=10000000

3) Create a new database with AL32UTF8.

4) Set old nls_lang enviorment variable before import in new databas

#export NLS_LANG=AMERICAN_AMERICA.WE8MSWIN1252

5) Import data in schema

# imp Username/password file=sigma.dmp log=import_SIGMAUAT_BACKUP.log fromuser= scott_backup touser=scott

Related Issues :

Ora-12899 value to large for the column string

Cause : column length is less the n data nedd to import/ insert into perticuler column

Solution: Increase the column length

Explanation: When a database is created using byte semantics, the size of the char and varchar data types are specified in bytes ,not character .when database use single byte encoding then number of character is equivalent to the number of bytes .But if database using multiple charcter set then charcter is no longer equivalent to the bytes

During migration to new character set ,it is important to verify the column width of exisiting char and varchar column because thay may need to extended to support an encoding the required multibyte storage

 Single-Byte and Multibyte Encoding



Character
WE8MSWIN 1252 Encoding
AL32UTF8 Encoding
Ä
E4
C3 A4
Ö
F6
C3 B6
©
A9
C2 A9
80
E2 82 AC







1 comment:

Unknown said...

Hi Vanita,

Can we convert character set from AL32UTF8 to WE8MSWIN1252