----这是按照网上的步骤执行,但是命令都执行失败,所以这些命令对我的环境来说是不行的
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 AL32UTF8;
alter database character set AL32UTF8
*
ERROR at line 1:
ORA-12712: new character set must be a superset of old character set
---至此网上的步骤调试失败,所以我继续查资料,又进行了如下的调试
SQL> shutdown immediate
Database closed.
Database dismounted.
Oracle instance shut down.
SQL> startup restrict
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1218992 bytes
Variable Size 113247824 bytes
Database Buffers 167772160 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
---一开始我是用的是如下的命令,结果失败
SQL> alter database character set simplified chinese_china.zhs16gbk;
alter database character set simplified chinese_china.zhs16gbk
*
ERROR at line 1:
ORA-00933: SQL command not properly ended
--我尝试了两次,改成大写也不行,
SQL> alter database character set simplified CHINESE_CHINA.ZHS16GBK;
alter database character set simplified CHINESE_CHINA.ZHS16GBK
*
ERROR at line 1:
ORA-00933: SQL command not properly ended
--最后,我使用了这命令,提示执行成功,之后通过测试中文乱码问题解决
SQL> alter database character set INTERNAL_USE ZHS16GBK;
Database altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1218992 bytes
Variable Size 113247824 bytes
Database Buffers 167772160 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
SQL>