可通过 select userenv('language') from dual; 语句查看安装的字符集;
如果不符合生产要求,请先修正字符集,方法如下 :
oracle修改服务器端字符集:
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 ZHS16GBK; --- 按照生产数据库字符集进行修改
如果出现了 ERROR at line 1: ORA-12712: new character set must be a superset of old character set
SQL> ALTER DATABASE character set INTERNAL_USE zhs16gbk; # 使用INTERNAL_USE可以跳过超集的检查,
ALTER DATABASE character set INTERNAL_USE
SQL>SHUTDOWN IMMEDIATE;
SQL>STARTUP 再检查就发现已经把字符集修整过来了
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
阅读(1244) | 评论(0) | 转发(0) |