Wednesday, July 28, 2004 12:00 AM nielsb

MSBuild Tasks for SQL Server 2005 Deployment

Angel Saenz-Badillos wrote a post about creating and deploying SQL Server 2005 UDT's from Visual Studio. He pointed put a couple of "shortcomings" in the deploument story of UDT's from Visual Studio.

First of all I want to say that Angel's blog is really worth subscribing to. If you are interested in new features of SQL Server 2005 and/or new transactional stuff in Whidbey - go off and subscribe!!

Secondly; the "shortcomings" he pointed out is mostly in Visual Studio. SQL Server Yukon supports now in Beta 2 the ALTER ASSEMBLY syntax. This means that if you use ALTER ASSEMBLY to redeploy an assembly, you do not need to drop the SQL objects (subject to certain rules) that are based on the methods/types in the assembly. Nor do you need to drop SQL objects with schema bindings against before mentioned SQL objects. As I said, this is based on certain rules, and you can read more about that in SQL Server Books Online. However, Visual Studio does not support ALTER ASSEMBLY, therefore Angels's post.

Finally, as some of you may know; for Beta 1 and some of the interim releases of SQL Server 2005, I created my own deployment tasks, in order not to have to rely on the deployment features of Visual Studio. I have now uploaded the latest release to (when I have worked out how to upload it to the SQL Server 2005 workspace on GotDotNet it'll be there as well). Some of the changes are:

  • Partial support of ALTER ASSEMBLY (read the README.txt file to see the caveats)
  • Instead of using my own custom deployment attributes the tasks now use the attributes from System.Data.Sql namespace:
    • SQLFacetAttribute
    • SQLFunctionAttribute
    • SQLProcedureAttribute
    • SQLTriggerAttribute
  • Support for deploying the same assembly several times but with different names.

If you are interested, download it. I suggest you read the README.txt first, followed by the deploytask.doc document in the docs directory. If you have any comments, suggestions,please post it here or email me!


No Comments