Welcome to AspAdvice Sign in | Join | Help

Deployment of SQL2005 assembly in VS.NET 2005

I've been playing extensively with SQL2005 for the last few days with VS 2005 beta 2. I was suprised to find out that VS.NET 2005's SQL Server Project does not seem to support ALTER ASSEMBLY-type of deploying properly, or that's how I see it. Is this really correct?

Let's take a sample. I have an assembly consisting of UDT Type1 and it has worked well in a few tables and there's a few thousands of rows using it extensively. Now, I'd want to add a new procedure implementation MyProcedure1 to this very same assembly. So from SQL Server standpoint, I'd need to alter the assembly so that I'd get new implementation "uploaded" (assembly) and then add the new procedure declaration (referring to the new method in the assembly within the CREATE PROCEDURE statement).

Problem is that SQl Server Project deployment in VS.NET seems to work from all-or-nothing basis. It tries to recreate all types etc I've provided in my assembly all at once, so while the previously mentioned UDT is in use in those tables, deployment of the new proc won't work out either. It is evident from the error I get after clicking Deploy in VS.NET.

Deploying file: SqlServerProject1.dll, Path: k:\omat tiedostot\visual studio\Projects\WebSite\SqlServerProject1\obj\Debug\SqlServerProject1.dll ...

Error: Cannot drop type 'Type1' because it is currently in use.

So I'd need to start doing deployment manually if I'd want to just add new implementation to my assembly and I'm still not changing any of the existing implementation. This feels a bit like unfinished feature (unless they yet fix it in some build)

While digging more about this, I luckily found Niels Berglund's custom SqlServerProject type which allows me to do exactly what the prementiuoned scenario demands. I can separately alter the assembly in VS.NET and also update implementations by object type basis (methods, UDTs separately) or just update it all. Quite cool utility by the way!

EDIT:

I made a suggestion on MSDN Feedback Center related to this. It's very unlikely that it would be noted in any way (they do review all of them, though) due to the product cycle (RTM being so close already), but gotta try. :-)
http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=dc302e2e-2ec7-4f5f-bff5-c5ee4d55a47d

Sponsor
Published Monday, July 04, 2005 4:13 PM by joteke
Filed under: ,

Comments

No Comments
New Comments to this post are disabled