How to import SET ANSI_NULLS ON/OFF for stored procedures in VS2010 Database Projects?
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 proced开发者_开发百科ures 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.
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.
精彩评论