select userenv(‘language’) from dual;
–查看oracle数据库的编码
select * from nls_database_parameters where parameter =’NLS_CHARACTERSET’;
–查询结果:
SIMPLIFIED CHINESE_CHINA.AL32UTF8
–修改oracle数据库字符集:(在SQL Plus中)
1.打开dos窗口,以sysdba的身份登录上去
–sqlplus / as sysdba;
sql> conn / as sysdba
;
–2.关闭数据库
sql> shutdown immediate;
–3.以mount打来数据库
sql> startup mount;
–4.设置session
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;
–5.启动数据库
sql> alter database open;
–6.修改字符集
–ALTER DATABASE character set INTERNAL_USE ZHS16GBK;
sql> alter database character set internal_use UTF8;
–7.关闭,重新启动
sql> shutdown immediate;
sql> startup;
–当然字符集最好不要轻易修改,因为这会对数据库的数据有直接的影响,如果是生产环境的话,可能会造成不可估计得损失。