2

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.

Jonas Lincoln
  • 9,567
  • 9
  • 35
  • 49
  • Can you expand ... - (1) Were the SET ANSI_NULLS ON/OFF options used when compiling the procs, or are they statements issued explicitly within each proc? (2)Are any of your procedures schema bound? (3) Do you want all to have the option ON or OFF? Or is the mixing intentional? – EBarr Oct 12 '11 at 12:50
  • @EBarr: I added some info in the question. – Jonas Lincoln Oct 12 '11 at 13:01

1 Answers1

1

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.