实时部署时的SQL排序规则问题 [英] Sql collation issues when deploying live

查看:78
本文介绍了实时部署时的SQL排序规则问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

历史:
前一天晚上我进行了一次部署,其中涉及执行创建存储过程的脚本。但是,在运行脚本时,发生了有关数据库排序规则的错误。

History: I had a deployment the other night which involved executing a script that creates a stored procedure. However when running the script, an error occurred about the collation of the DB.

问题:
在我们的朋友Google的帮助下,我设法发现我遇到的问题是因为在我们的活动环境的数据库中有一个排序规则和临时数据库的排序规则不同,并且尝试插入变量表时出现错误。

The Problem: With the help of our friend Google, I managed to find out that the problem I was having was because on our live environment's db has one collation and the temporary DB's collation is different, and I was getting an error when trying to insert into a variable table.

问题:
最好的

The Question: What is the best way forward, or my options?

环境:
sql 2000

Environment: sql 2000

请先谢谢。

推荐答案

我们已经开始使用用于开发和生产数据库的临时数据库来进行集成测试。我们要做的是确保所有数据库使用相同的排序规则。在您的情况下,您应该应该可以在脚本文件中进行简单的搜索/替换,并将排序规则更改为目标数据库中使用的排序规则。

We have been running into this one with temporary databases that we use for integration tests, in relation to development and production databases. What we have done is to make sure that all databases use the same collation. In your case, you should probably be able to do a simple search/replace in the script file and simply change the collation to the one used in the target database.

编辑:更改脚本可以使您立即前进;从长远来看,您将需要确保在所有相关数据库中使用相同的排序规则。

changing in the script will get you forward now; in the longer run you will want to make sure to use the same collation in all related databases.

这篇关于实时部署时的SQL排序规则问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆