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 ...
随机推荐
- Byte[]分配在哪里?
http://stackoverflow.com/questions/1113819/arrays-heap-and-stack-and-value-types Your array is alloc ...
- 解题报告:hdu1003 Max Sum - 最大连续区间和 - 计算开头和结尾
2017-09-06 21:32:22 writer:pprp 可以作为一个模板 /* @theme: hdu1003 Max Sum @writer:pprp @end:21:26 @declare ...
- python 使用set对list去重,并保持list原来顺序
list_one=re.findall(r"^\s{0}[A-Za-z]*\b", txt,re.M) #匹配一级目录 addr_to = list(set(list_one))a ...
- C# 一些常用的字符串扩展方法
以下可能是常用的.net扩展方法,记录下 EString.cs文件 /// <summary> /// 扩展字符串类 /// </summary> public static ...
- JavaScript高级程序设计-读书笔记(5)
第13章 事件 1.事件流 事件流描述的是从页面中接收事件的顺序.IE的事件流是事件冒泡流,而Netscape Communicator的事件流是事件捕获流. (1)事件冒泡,即事件开始时由最具体的元 ...
- Module 的加载实现
浏览器加载 传统方法 HTML 网页中,浏览器通过<script>标签加载 JavaScript 脚本. <!-- 页面内嵌的脚本 --> <script type=&q ...
- mock数据
作为前端经常需要模拟后台数据,我们称之为mock.通常的方式为自己搭建一个服务器,返回我们想要的数据. 在这里我们使用node.js来实现 http://www.cnblogs.com/bsn-hua ...
- 关于 Token,你应该知道的十件事
转自:http://ju.outofmemory.cn/entry/134189 原文是一篇很好的讲述 Token 在 Web 应用中使用的文章,而这是我和 Special 合作翻译的译文. 1. T ...
- python中enumerate()函数用法
python中enumerate()函数用法 先出一个题目:1.有一 list= [1, 2, 3, 4, 5, 6] 请打印输出:0, 1 1, 2 2, 3 3, 4 4, 5 5, 6 打印输 ...
- 【原创】Centos 7利用软件Raid搭建ISCSI过程
测试机器安装了4块2T硬盘,一块320G硬盘,利用320G硬盘安装CentOS 7系统,在CentOS 7系统上利用4块2T硬盘组建Raid 0,再配置iSCSI存储.注意,本文中的RAID指的是软R ...