Oracle编码格式查看与修改

--查看oracle数据库字符集:
select userenv('language') from dual;

查询结果:

SIMPLIFIED CHINESE_CHINA.AL32UTF8

//SIMPLIFIED CHINESE_CHINA.ZHS16GBK

--修改oracle数据库字符集:(在SQL Plus中)

开始-》运行-》输入cmd,输入sqlplus / as sysdba;进入数据库;//sqlplus sys/oracle@localdb as sysdba;
sql> shutdown immediate;<!--IWMS_AD_BEGIN-->


<!--IWMS_AD_END-->
database closed.
database dismounted.
oracle instance shut down.
sql> startup mount;
oracle instance started.

 

total system global area  135337420 bytes
fixed size                          452044 bytes
variable size                     109051904 bytes
database buffers              25165824 bytes
redo buffers                      667648 bytes
database mounted.

sql> alter system enable restricted session;

system altered.

sql> alter system set  job_queue_processes=0;

system altered.

sql> alter system set  aq_tm_processes=0;

system altered.

sql> alter database open;

database altered.

sql> alter database character set internal_use JA16SJIS;

     // alter database character set internal_useAL32UTF8;

sql> shutdown immediate;

sql> startup;


SIMPLIFIED CHINESE_CHINA.ZHS16GBK
SIMPLIFIED CHINESE_CHINA.AL32UTF8(一个全角=三个半角)


注意:改完数据库的字符集要执行:ALTER SYSTEM DISABLE RESTRICTED SESSION;否则pl/sql连不上


你可能感兴趣的:(Oracle编码格式查看与修改)