|
|
我用的是动网.net论坛,原系统的MSSQL据库是用"Chinese_PRC_CI_AS"排序规则的.
关于数据库导入,我的操作方法过程是这样的:
1.先备份原来网站的数据库,然后在本机的MSSQL上用SQL Server Management Studio还原(因为没有权限直接还原godaddy的数据库)
2.用Database Publishing Wizard将本机的数据库导入到godaddy上,但提示出错,因为源数据库的排序规则是"Chinese_PRC_CI_AS",而目标数据库则是"SQL_Latin1_General_CP1_CI_AS"
3.于是我尝试修改godaddy数据库的排序规则,用命令: ALTER DATABASE 库名 COLLATE Chinese_PRC_CI_AS
但系统提示我没有权限.于是我写了邮件希望godaddy帮我修改排序规则,得到的答复是他们不能改变数据库的排序规则,他们说如果这样做会影响到数据库服务器里的其他数据库的排序规则:
Thank you for contacting Hosting Support.
Unfortunately, you will not have access to do a full text collation on shared hosting, as this would need to be done at the server level and would affect the collation for all other customer's on the shared database server. However, you should be able to change the collation for specific tables in MS SQL through the SQL Server Admin.
To Access The SQL Server Admin:
1. Log in to your Account Manager.
2. In the My Products section, select Hosting.
3. Next to the hosting account you want to modify, click Manage Account.
4. In the Databases section of the Hosting Control Center, click the SQL Server icon.
5. Next to the database to which you are importing, click the Open Manager icon.
Please let us know if we can be of any further assistance.
Regards,
Scott S.
Hosting Support
5.于是我将本地数据库的排序规则改成:"SQL_Latin1_General_CP1_CI_AS",数据库导入成功,内容完好不变.
6.但问题是发帖时系统出错,于是我将"Web.config"中的 requestEncoding="gb2312" 改成 requestEncoding="utf-8",发帖问题解决.
7.原来的数据库内容显示正常. 但无论是新发帖还是编辑过的帖子,内容都变是???? ,所有都变成问号. godaddy的后面查看数据库,里面的中文内容也全是问题.但导入的没编辑过的中文数据没有问题. 所以排除读取错误. 那就一定是写入错误.
godaddy方面说用他们的数据库管理后面能修改数据库表的排序规则(However, you should be able to change the collation for specific tables in MS SQL through the SQL Server Admin. ),但我试过了找不到选择或方法,请版主帮忙一下,谢谢大家了! |
|