Oracle12c更改字符集

Oracle Server端字符集查询
SQL> select userenv(‘language‘) from dual;
USERENV(‘LANGUAGE‘)
----------------------------------------------------
AMERICAN_AMERICA.ZHS16GBK
由此可以看出字符集为ZHS16GBK


Server端字符集修改
将数据库启动到RESTRICTED模式下做字符集更改:
$ sqlplus "/as sysdba"
SQL> conn /as sysdba;
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 INTERNAL_USE UTF8;
SQL> shutdown immediate;
SQL> startup;
SQL> exit;
我这是在oracle12里的改法,11g应该一样吧

Oracle12c更改字符集

上一篇:MySQL根据经纬度按距离排序


下一篇:Mysql的timestamp(时间戳)详解以及2038问题的解决方案