2011. 7. 9. 11:36

오라클 10g 한글깨짐 (UTF-8 변경)


환경

Cent OS 5.5 / Oracle 10g
------------------------------------------------------------------------------

SELECT * FROM sys.props$ where name='NLS_CHARACTERSET';  //캐릭터셋 확인


1. 프로파일 수정
export NLS_LANG=KOREAN_KOREA.UTF-8

export NLS_LANG=KOREAN_KOREA.KO16MSWIN949


2. 캐릭터셋 변경

C:\>sqlplus /nolog;

sql>conn /as sysdba;

 

변경하고자하는 캐릭터셋을 수정

== UTF-8 ==
sql>update sys.props$ set value$='UTF8' where name='NLS_CHARACTERSET';

sql>update sys.props$ set value$='UTF8' where name='NLS_NCHAR_CHARACTERSET';

sql>update sys.props$ set value$='KOREAN_KOREA.UTF8' where name='NLS_LANGUAGE';

= KO16MSWIN949 = //한글확장
sql>update sys.props$ set value$='KO16MSWIN949' where name='NLS_CHARACTERSET';

sql>update sys.props$ set value$='KO16MSWIN949' where name='NLS_NCHAR_CHARACTERSET';

sql>update sys.props$ set value$='KOREAN_KOREA.KO16MSWIN949' where name='NLS_LANGUAGE';

sql>commit;

 

재시작

sql>shutdown immediate;

sql>startup mount;

sql>alter system enable restricted session;

sql>alter system set job_queue_processes=0;

sql>alter system set aq_tm_processes=0;

sql>alter database open;

sql>alter database character set UTF8;

or  alter database character set KO16MSWIN949;

sql>shutdown immediate;

sql>startup;





참고 주소 : http://blog.stylegold.info/45