How to you handle the contents of lookup tables that should be treated as "code" rather than data?
Asked
Active
Viewed 295 times
3
-
code as in you want execution permission? or code as in compile time initialized? – John Knoeller Feb 06 '10 at 01:13
-
as in "we can't deploy version 2 of proc FooBar unless we insert OptionKey 17 in table Bar at the same time" – Jonathan Allen Feb 06 '10 at 01:19
1 Answers
4
There is currently no good support in VS for Database Developers for managing reference data.
There is a good post at MSDN that proposes a work around for this missing feature that uses a temp table and a post deployment script to merge changes to the reference data at deployment time.
Essentially your reference data exists as a static set of insert statements into your temp table and then the merge keeps the live tables up to date.
I've been using the approach on a large fully CI project for the last five months or so and found it works well.
I've also got my fingers crossed that they will add better support for this in VSDB vNext.

David Hall
- 32,624
- 10
- 90
- 127