Learn and Be Curious

oracle characterset

dev/RDB2017. 4. 3. 00:13

http://loonyhyun.tistory.com/61


1. client set



export NLS_LANG=KOREAN_KOREA.KO16KSC5601 #한글

export NLS_LANG=KOREAN_KOREA.KO16MSWIN949 #한글(추천:지원캐릭터가 더 많음 -뷃,숖..)

export NLS_LANG=AMERICAN_AMERICA.UTF8 #유니코드



2. db 환경변수 확인



select * from nls_database_parameters where parameter like '%CHARACTERSET%';

select VALUE$ from sys.props$ where name='NLS_LANGUAGE';



3. db 환경변수 변경



update props$ set VALUE$='UTF-8' where name='NLS_CHARACTERSET';

update props$ set VALUE$='KO16MSWIN949' where name='NLS_CHARACTERSET';

update props$ set VALUE$='KO16KSC5601' where name='NLS_CHARACTERSET';



update props$ set VALUE$='KOREAN' where name='NLS_LANGUAGE';

update props$ set VALUE$='KOREA' where name='NLS_TERRITORY';



4. shutdown 및 startup



shutdown immediate;



startup;



------------------------------------------------------------------------------

# 두번째



1. sysdba 접속

sqlplus / as sysdba



2. 일반 사용자의 세션 가능 제한 모드

alter system enable restricted session;



3. job_queue_processes 에 등록된 job 프로세스 정지

alter system set job_queue_processes = 0;



4. aq_tm_processes에 등록된 job 프로세스 정지

alter system set aq_tm_processes = 0;



5. db 오픈

alter database open;



6. 변경할 캐릭터 셋으로 변경

alter database character set internal_use KO16MSWIN949;



7. shutdown 및 startup

shutdown immediate;

startup;















root@cc718514202e:~# su - oracle
oracle@cc718514202e:~$ sqlplus /nolog

SQL*Plus: Release 11.2.0.2.0 Production on Sun Apr 2 14:40:08 2017

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

SQL> conn / as sysdba;
Connected.
SQL> update props$ set VALUE$='KO16KSC5601' where name='NLS_CHARACTERSET';

1 row updated.

SQL> update sys.props$ set VALUE$='KOREAN' where name='NLS_LANGUAGE';

1 row updated.

SQL> update props$ set VALUE$='KOREA' where name='NLS_TERRITORY';

1 row updated.

SQL>
SQL>
SQL> shutdown immediate;
ORA-01097: cannot shutdown while in a transaction - commit or rollback first
SQL> commit;

Commit complete.

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> ^[[A^C

SQL> startup;
ORACLE instance started.

Total System Global Area  601272320 bytes
Fixed Size                  2228848 bytes
Variable Size             201330064 bytes
Database Buffers          394264576 bytes
Redo Buffers                3448832 bytes
Database mounted.
Database opened.

'dev > RDB' 카테고리의 다른 글

AWS RDS MariaDB character set 문제  (0) 2017.06.09
aws mysql PRIVILEGES  (0) 2017.06.07
faro sql script  (0) 2017.04.03