วันพฤหัสบดีที่ 1 พฤษภาคม พ.ศ. 2551

Change oracle database character set

I had problem with AL32UTF8 character from Oracle ... so I want to change character set to THTISASCII by follow as step

sqlplus "/as sysdba"
startup;
select * from nls_database_parameters;
shutdown immediate;

STARTUP MOUNT;

ALTER SYSTEM ENABLE RESTRICTED SESSION;
ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
ALTER SYSTEM SET AQ_TM_PROCESSES=0;
ALTER DATABASE OPEN;
ALTER DATABASE CHARACTER SET TH8TISASCII;

SHUTDOWN;
STARTUP;

After follow this step as my friend suggest I found error with command

ALTER DATABASE CHARACTER SET TH8TISASCII;
ORA-12712: new character set must be a superset of old character set

Because old character set is Superset of new character set so Oracle does not allow to change character set.

Anyway you can avoid this problem if you really want to change it by using command
ALTER DATABASE CHARACTER SET INTERNAL_USE TH8TISASCII;

Oracle will allow you to change character set although old character set is a superset of new character set but you must make sure that this change will not impact your database.

:)