Deploying GDR (R2) Databases

Deploying GDR (R2) Databases

Posted by richard | April 29, 2009 | Visual Studio 2008, Visual Studio ALM

As I was explaining how the Build > Deploy process is radically different this week, a question came up about licensing restrictions around the vsdbcmd.exe command-line utility that ships with the GDR. Here’s a quick history lesson:

The Pre-GDR Way

The Build process analyzes the target connection and then assembles all of the various .sql scripts into one large .sql script. The resulting script would contain CREATE or ALTER statements depending on what it found when it studied the target connection. The script also contains other custom scripts and variables you want to define. The problem is that this Build process requires access to that target environment. This was not always a possibility – either the developers didn’t have permissions, or ISVs didn’t have physical access to their customer’s datacenters. Finally, the Deploy process would then just execute the big .sql script against the target connection, which could be done using VS, SSMS, SQLCMD, etc.

The GDR Way

The Build process generates a .dbschema file which represents the current schema definitions of the database project in a single, easy-to-handoff XML document. This document has accompanying scripts and manifest files as well. The Deploy process then creates the .sql script and (optionally) executes it. The Deploy is now the only connected operation and it can be performed from Visual Studio or by using the new vsdbcmd.exe command-line utility. The major difference is that Build doesn’t need access to the target database, only Deploy does. This rocks, because now you can just give the .dbschema file to that department’s DBA or that customer’s datacenter admin, etc. and only they need access to the target to generate the proper script and to execute it. Problem solved.

… but question raised: what about the licensing of the vsdbcmd.exe file? Can the developer or ISV just give it to their respective user to deploy the changes?

The answer (thanks to Ted Malone, SQL guru and VSTS MVP) is YES, as explained in this article by Gert Drapers.

BTW – GDR R2 is available so you should download it now!

Related Blogs

Posted by richard | September 30, 2016
Wassup Team Room?
According to Microsoft's official definition, Team Rooms, like chat rooms, "provide teams with a space to discuss work in progress, ask questions, share status, and clarify issues that arise." Sounds...
Posted by richard | February 24, 2015
Use Excel to Create Repetitive Work Items
Teams often ask me for any shortcuts to periodically creating the same work items, such as for each sprint or release. In other words, they want to create the same...
Posted by richard | October 7, 2013
The One Work Item check-in policy
Thanks to my fellow Visual Studio ALM MVP Colin Dembovsky for building the “One Work Item” check-in policy that I was always too lazy to build. Judging by the title,...