SQL Server, Cannot resolve the collation conflict
今天遇到一个较为头痛的问题:
Cannot resolve the collation conflict between "Chinese_PRC_90_CI_AS" and "Latin1_General_CI_AS" in the equal to operation.
SQL2008 R2,数据库是从SQL2005的备份文件还原回来的。
估计是因为各种环境问题从而导致同一个数据库不同的表中的列有不同的Collation设置,导致在通过这样的字段连接两个表的时候报上面的错误。
有几个不错的连接描述了相关问题:
http://technet.microsoft.com/en-us/library/hh230914.aspx
但是执行这个SQL:
SELECT distinct collation_name FROM sys.columns
列出了五六种不同的设置,可能涉及到很多表和字段,总不可能一个一个去改吧。
报着试一下的心理:把这个数据库的数据导出到另一个数据库(也是2008R2),看能不能解决这个问题。结果还真管用,不用一个一个去改了。
用的工具是:SQL Server Management Studio
这里的导出不是备份,通常是Backup成一个文件再还原到另外一个数据库。
我用的导出是点数据库的右键,选择Export Data,这样导出数据库就可以。
SQL Server, Cannot resolve the collation conflict的更多相关文章
- sql server Cannot resolve the collation conflict between "Chinese_PRC_BIN" and "Chinese_PRC_CI_AS" in the equal to operation
今天查询二个db,出现这个错误,二种方法,一种是把db里的collation改成一样的:如果不方便可以直接在sql语句后面转一下: select * from table where crm_mscr ...
- 解决SQL Server的cannot resolve the collation conflict问题
当没有牵涉到两个不同的数据库时,出现以上错误. Cannot resolve the collation conflict between "Chinese_PRC_CI_AS" ...
- Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_100_CI_AS" in the equal to operation.
ErrorMessage Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" ...
- Cannot resolve the collation conflict between "Chinese_PRC_CI_AS" and "SQL_L及由于排序规则不同导致查询结果为空的问题
报错:Cannot resolve the collation conflict between "Chinese_PRC_CI_AS" and "SQL_L 出错原因: ...
- Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Chinese_PRC_CI_AI" in the equal to operation.
Executed as user: NT AUTHORITY\SYSTEM. Cannot resolve the collation conflict between "Chinese_P ...
- sql server 小技巧(6) Cannot resolve the collation conflict between "Latin1_General_CI_AI" and "Chinese_PRC_CI_AS" in the equal to operation
今天查询二个db,出现这个错误,二种方法,一种是把db里的collation改成一样的:如果不方便可以直接在sql语句后面转一下: select * from table where crm_mscr ...
- 设置与使用SQL Server的字符集(Collation,即排序规则)
目录 目录 正确认识SQL Server的字符集 选择合适的SQL Server字符集 错误使用SQL Server的字符集 参考资料 正确认识SQL Server的字符集 SQL Server作为一 ...
- Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Chinese_PRC_CI_AS" in the equal to operation.
Scenario : 这个问题是我的存储过程中用到临时表时发生的. 应该是sql server 服务器的排序规则 (SQL_Latin1_General_CP1_CI_AS ) 与数据库的排序规则(C ...
- Sql server中Collation conflict问题
SQL语句查询时select A.Code,A.Name,a.Systemcode,B.ID,B.LogType,B.DMCode,B.IP,B.Department,B.CreateBy,B.Cre ...
随机推荐
- Mac下配置Hadoop环境
下载Hadoop(我下载的是2.8.0版本) 点击此处下载 下载后,使用 tar -zxvf tar包名 解压tar包,解压完成后有这样一个文件出现 修改Hadoop的配置文件 需要修改的配置文件在H ...
- Glibc-2.3.4编译
$tar xf Glibc2.3.4.tar.bz2 $mkdir build_glibc $cd build_glibc ../glibc-2.3.4/configure --prefix=/too ...
- SPOJ104 HIGH - Highways
本文版权归ljh2000和博客园共有,欢迎转载,但须保留此声明,并给出原文链接,谢谢合作. 本文作者:ljh2000 作者博客:http://www.cnblogs.com/ljh2000-jump/ ...
- Linux权限控制
文件属性 权限说明 文件用户组调 权限设置建议 文件属性 在shell环境里输入:ls -l 可以查看当前目录文件.如: drwxr-xr-x. 14 root root 4096 Apr 5 18: ...
- 开发H5游戏引擎的选择:Egret或Laya?
开发H5游戏引擎的选择:Egret或Laya? 一.总结 一句话总结:选laya吧 二.开发H5游戏引擎的选择:Egret或Laya? 一.H5游戏开发的引擎介绍 开发H5游戏的引擎有很多,比如egr ...
- IOS-CocoaPods进阶篇
一.Podfile.lock文件 上文讲过,在开始使用CocoaPods,执行完pod install之后,会生成一个Podfile.lock文件.这个文件看起来跟我们关系不大,实际上绝对不应该忽略它 ...
- Python内置函数详解-总结篇
参考链接:http://www.cnblogs.com/sesshoumaru/p/6140987.html
- linux---nginx服务nfs服务nginx反向代理三台web
一:nginx服务 1.二进制安装nginx包 [root@bogon ~]# systemctl disable firewalld #关闭Firewalls自启动 Removed symlink ...
- git推送文件到远程仓库
远程仓库未创建 git init 初始化一只本地仓库 把你的项目扔进去(或者基于初始化仓库建立项目vue init webpack demoxxxx) git status //查看状态 git ad ...
- h5开发中,利用微信或者QQ登陆以后获取用户头像在canvas画布显示问题
在实际开发上先的h5页面产品中,总会遇到各种坑,好多坑都是安卓和iPhone端兼容的问题(用电脑谷歌浏览器输入 chrome://inspect/#devices可以用手机USB调试,打开) eg: ...