----這是按照網上的步驟執行,但是命令都執行失敗,所以這些命令對我的環境來說是不行的
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>