SELECT * FROM nls_database_parameters WHERE parameter LIKE '%CHARACTERSET%';
-- NLS_CHARACTERSET : AL32UTF8
-- NLS_NCHAR_CHARACTERSET : AL16UTF16
SELECT VALUE$ FROM sys.props$ WHERE name='NLS_LANGUAGE';
SELECT * FROM nls_database_parameters WHERE parameter = 'NLS_LANGUAGE'
-- AMERICAN
UPDATE props$ SET VALUE$='KO16MSWIN949' WHERE name='NLS_CHARACTERSET';
UPDATE props$ SET VALUE$='AL16UTF16' WHERE name='NLS_NCHAR_CHARACTERSET';
UPDATE sys.props$ SET VALUE$='KOREAN_KOREA.UTF8' WHERE name='NLS_LANGUAGE';
commit;
-- 모든 데이터베이스에 일괄 적용. 아래 작업을 안하면 오류 발생했음.
-- ORA-06552: PL/SQL: Compilation unit analysis terminated
-- ORA-06553: PLS-553: 알 수 없는 문자 집합 이름입니다
-- ORA-06553: PLS-553: character set name is not recognized
ALTER SYSTEM ENABLE RESTRICTED SESSION;
ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
ALTER SYSTEM SET AQ_TM_PROCESSES=0;
ALTER DATABASE CHARACTER SET INTERNAL_USE KO16MSWIN949;
ALTER DATABASE NATIONAL CHARACTER SET INTERNAL_USE AL16UTF16;
-- 재시작
shutdown IMMEDIATE
startup
문자셋 종류
KO16KSC5601
: 완성형 한글, 한글2350글자. 한글 2bytes 차지
KO16MSWIN949
: CP949, 모든 한글 표현, 한글 2bytes 차지
AL32UTF8
: UTF-8, 한글 3bytes 차지
참고
-- 부여
GRANT SELECT, INSERT, DELETE, UPDATE ON [TABLE NAME] TO [USER];
-- 해제
REVOKE SELECT, INSERT, DELETE, UPDATE ON [TABLE NAME] FROM [USER];