分类: Oracle
2008-07-23 14:32:02
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%';
NLS_CHARACTERSET
ZHS16CGB231280