如何在VS2010数据库项目中导入存储过程的SET ANSI_NULLS ON/OFF?
我认为我的问题在我的问题中得到了很好的阐述,但这里有一些背景:
我们的数据库中有大约 1500 个存储过程。其中大约一半将 SET ANSI_NULLS 设置为 ON,一半将 SET ANSI_NULLS 设置为关闭。
我们想使用vs2010数据库项目,并且正在将所有程序导入到一个新的db项目中(导入脚本)。我预计项目中创建的过程中有一半的数据库选项 ANSI Nulls 属性为 ON,一半为 OFF,但它们都具有“项目默认值”。
如何正确导入我的程序?
添加信息:
程序被编写为
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE ...
由于历史原因而存在混合,我们需要保持这种方式。我们目前没有资源来解决所有问题。
I think my question is covered pretty well in my question, but here's some background:
We have about 1500 stored procedures in our database. About half of them have SET ANSI_NULLS ON and half have SET ANSI_NULLS OFF.
We want to use vs2010 database projects, and are importing all the procedures to a new db project (import scripts). I expect half of the created procedures in the project to have the property Database Option ANSI Nulls ON and half OFF, but all of them have "Project Default".
How do I correctly import my procedures?
Adding info:
The procedures are scripted as
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE ...
The mixing exists because of historical reasons, and we need to keep them that way. We don't currently have the resources to sort everything out.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我今天刚刚遇到这个问题(在表对象上),根据 Microsoft Connect,问题已发送给工程人员。
实际上,看起来 ANSI_NULLS 仅在数据库级别进行跟踪,而不是在每个对象级别:( 解决方法是使用部署后脚本。
希望能在下一版本的 Visual Studio 中进行修复。
I just ran into this problem today(on table objects) and according to Microsoft Connect, the problem has been sent to engineering.
Effectively it looks like ANSI_NULLS is only tracked at the Database level, not at every object level :( And the workaround is to use a post-deployment script.
Hopefully a fix for the next release of Visual Studio.