日期:2014-05-16  浏览次数:20471 次

修改Oracle数据库字符集为UTF8
查看字符集
select userenv('language') from dual;
1.conn/as sysdba
2.执行下面代码:

SHUTDOWN IMMEDIATE;
STARTUP MOUNT EXCLUSIVE;
ALTER SYSTEM ENABLE RESTRICTED SESSION;
ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
ALTER SYSTEM SET AQ_TM_PROCESSES=0;
ALTER DATABASE OPEN;
(------------如果有问题请在此插入下面语句--------------)
ALTER DATABASE NATIONAL CHARACTER SET UTF8;
ALTER DATABASE CHARACTER SET UTF8;
SHUTDOWN immediate;
STARTUP;

如果修改出现问题时请调用下面语句再执行一次就可以了
ALTER DATABASE NATIONAL CHARACTER SET INTERNAL_USE UTF8;