What is SQL Server Database Project?
NOTE: This post pertains to Visual Studio 2012.
A SQL Server Database Project is a Visual Studio project type that allows you to create, edit and publish a database to SQL Server. These projects create a file type with an extension of .dacpac. What these file are in actuality is a set of SQL scripts that are executed on a Microsoft SQL Server. If the database does not yet exist on the server when the .dacpac is run it will create the database, otherwise the database will be updated.
One of the good things about using this project is that you can save the project into your source control tool (TFS, Subversion, etc.) which allows for the tracking of changes. Also, you can set a property when you build the project that will allow you to register the database as a data-tier application. Now, what this does is it creates an entry in the MSDB.dbo.sysdac_instances_internal database with a version number, this version number can be changed in the project as well. This is done by going to your projects properties and selecting “Project Settings” and the clicking the “Properties” button under “Output types.” This will open up a window that has a version number in it.
In my next post I will go over actually creating and deploying a project.
From the blog joshjoubert » CS@Worcester by Josh and used with permission of the author. All other rights reserved by the author.
