Deborah's Developer MindScape






         Tips and Techniques for Web and .NET developers.

February 5, 2014

Deploying a DACPAC

If you are using Visual Studio 2012 or above, you can create a SQL Server Database Project to include all of your table, view, stored procedure, and data scripts. (See #1 below)

When you build the Database Project (#2), Visual Studio generates a DACPAC file (#3). The DACPAC is a single unit of deployment that you, your DBA, or another individual can use to deploy database schema changes or reference data.

When deployed, the SQL Server Data Tools (SSDT) perform some magic. They compare (#4) the contents of the "master" database as defined in the DACPAC (#3) to the target deployment database.

SSDT then automatically generates (#5) a change script (#6). The change script includes all of the changes to apply to the target database to bring its schema up to match the schema defined in the DACPAC and to deploy any reference data defined in the DACPAC.

The SSDT then executes (#7) the script against the target database and the deployment is complete.

COOL!

image

So I created my database project, built it to generate the DACPAC. Now what? How do I make it do all of that magic? How do I (or my DBA) actually deploy the DACPAC?

There are many different ways to deploy a DACPAC:

Click a link above to view details on deploying a DACPAC with each of these techniques.

Enjoy!

For more information on this and other SSDT features, see my latest Pluralsight course: "Visual Studio Data Tools for Developers", which you can find here.

RSS feed for comments on this post. TrackBack URI

Leave a comment

© 2017 Deborah's Developer MindScape   Provided by WPMU DEV -The WordPress Experts   Hosted by Microsoft MVPs