你好,游客 登录 注册 搜索
背景:
阅读新闻

Linux 下修改Oracle 的字符集:WE8ISO8859P1 修改为 ZHS16GBK

[日期:2011-04-09] 来源:Linux社区  作者:lvbang_lzt [字体:大 中 小]

----这是按照网上的步骤执行,但是命令都执行失败,所以这些命令对我的环境来说是不行的
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>

linux
相关资讯       Oracle教程 
本文评论   查看全部评论 (3)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款
第 3 楼
* 谔谔 发表于 2012/7/5 16:57:01
不错
第 2 楼
* 123 发表于 2012/6/12 14:32:59
有用
第 1 楼
* kk 发表于 2011/9/16 18:31:57
牛逼啊!