This topic has been archived. It cannot be replied.
-
枫下家园 / 电脑用户 / 一个中文数据库,转移到英文MS SQL SERVER上后,发现不能查询中文数据。只能查询英文数据。请问谁有经验解决?谢谢
-timd(头疼);
2003-7-3
(#1269450@0)
-
1. 查SQL SERVER资料, 看英文版的SQL SERVER是否支持中文, 另外你的操作系统是否支持中文? 如果是英文版的操作系统, 必须先安装中文包.
2. 如果上面的办法不能解决, 就只好换成中文系统了.
-aix(AIX);
2003-7-7
(#1274189@0)
-
你在transfer data之前,英文版的database上相应的table里所对应的field有没有设定成unicode?
-yangn(Raymond);
2003-7-7
(#1274228@0)
-
你确认设置成UNICODE就可以了?那要删除数据库重新建立。你以前有试过吗?我估计是排序规则名称那里出问题,但不知道怎么用命令修改数据库默认的排序规则。
-timd(头疼);
2003-7-7
(#1275063@0)
-
也可能是Code Page设置错误,不过Code Page和排序都不能在数据库建立后修改,必须重建数据库。
-xhis(枫下恩仇#13 xhis);
2003-7-7
(#1275085@0)
-
两者都可以建立后用命令修改,code page可以在程序里设置936修改,排序必须有管理员权限才可以用修改。可服务器是虚拟主机,我就没这个权限了。
-timd(头疼);
2003-7-7
(#1275127@0)
-
才发现,也没权限用命令修改排序规则。对方是虚拟主机。
-timd(头疼);
2003-7-7
(#1275081@0)
-
只要你是DB OWNER,你就可以用ALTER DATABASE去修改特定DB的COLLATION
-yangn(Raymond);
2003-7-8
(#1276535@0)
-
是DB_OWNER,执行后出如下错误:服务器: 消息 3704,级别 16,状态 3,行 1
User does not have permission to perform this operation on database 'xxx'.
服务器: 消息 5072,级别 16,状态 1,行 1
ALTER DATABASE failed. The default collation of database 'xxx' cannot be set to Chinese_PRC_CI_AS.
-timd(头疼);
2003-7-11
{262}
(#1280636@0)
-
应该你的方法对了。正在重新建立数据库。一会复制完数据测试一下。谢谢先!
-timd(头疼);
2003-7-7
(#1275134@0)
-
看来也不是这个问题了。因为在SQL 2000中,SQL_Latin1_General_CP1_CI_AS 排序规则和7.0的unicode是一样的,现在我用的就是这个LATIN1,问题还是一样。
-timd(头疼);
2003-7-8
(#1276482@0)
-
看来你的database collation 不适合存储中文.假设你用的是SQL 2000, 你可以通过 ALTER DATABASE 改变你的相应DB的CODE PAGE, 相对于中文的CODE PAGE 是936, 你现在用的LATIN1如果我没有记错的话,CODE PAGE 是1252, 把它改成936应该就可以了.另外在新的DB里.存储中文的COLUMN应该是NCHAR 或者NVARCHAR
-yangn(Raymond);
2003-7-8
{116}
(#1276529@0)
-
用的是SQL2000,无权限执行ALTER DATABASE 命令,因为是虚拟主机。他们做了个接口,创建数据库用他们的接口程序,无法直接在管理器里创建数据库。但我的SQL用户名是OWNER权限。中文字段部分一直都是NVARCHAR 的。还是不行。
-timd(头疼);
2003-7-11
(#1280629@0)
-
记得以前就算把CODE PAGE 改了,还是一样,用英文的ODBC取出的照样不是中文,不知道MS的DRIVER有否更新,实在不行,就把ANSI转为WIDECHAR,(没试过,不知行不行)
-argcsina(我是陌生人);
2003-7-11
{80}
(#1280645@0)
-
用管理器来修改的话,发现collation 那里没chinese_prc_ci_as这个规则,甚至没任何中文的。都是其他国家的。
-timd(头疼);
2003-7-11
(#1280643@0)