修改ORACLE字符集

修改oracle字符集

原来安装oracle总是不注意,把字符集按默认安装了,导致应用显示不对,在网上找了一些解决办法,但都报错,但

SQL> ALTER DATABASE character set INTERNAL_USE ZHS16CGB231280;

# 使用INTERNAL_USE可以跳过超集的检查,ALTER DATABASE character set INTERNAL_USE

加这个以后,就可以彻底解决修改的问题,即使报错也能修改,下面是完整的例子.

修改Oracle10g数据库字符集

SQL> connect sys/oracle as sysdba

SQL> startup mount

SQL> alter session set sql_trace=true;

Session altered.

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> set linesize 120;

SQL> alter database character set zhs16gbk;

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 ZHS16CGB231280;

# 使用INTERNAL_USE可以跳过超集的检查,ALTER DATABASE character set INTERNAL_USE

Database altered.

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> STARTUP

SQL> select name,value$ from props$ where name like ‘%NLS%‘;


郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。