Deploying a DACPAC with Visual Studio
There are several different tools that you, the DBA, or another individual can use to deploy a DACPAC as defined in this prior post. This current post details how to deploy a DACPAC using Visual Studio.
Starting with Visual Studio 2013, the SQL Server data tools (SSDT) are available in*every* edition of Visual Studio, including the Express editions. So the DBA or other deployment personnel can use one of the free Express editions of Visual Studio to manage database projects and deploy DACPACs.
If you have Visual Studio 2012 or older, see this blog post for information on obtaining the appropriate SSDT.
Here are the steps for deploying a DACPAC with Visual Studio:
- Open the SQL Server Object Explorer window (View | SQL Server Object Explorer).
- Navigate to the database you wish to deploy to. This is the database that will be updated. In this case it is TestACM to deploy the DACPAC to the test database.
- Right-click on the database and select Publish Data-tier Application… from the context menu.
- The Publish Data-tier Application dialog is displayed (see below).
- Use the Browse button to find and select the DACPAC file. It is located in the Bin\Debug directory of the database project.
- When you are finished specifying the publish parameters, click the Publish button to publish the DACPAC to the target database.
The status of the deployment appears in the Data Tools Operations window.
Use the SQL Server Object Explorer within Visual Studio to deploy a DACPAC to any database.
Enjoy!
For more information on this and other SQL Server Data Tools (SSDT) features, see my latest Pluralsight course: "Visual Studio Data Tools for Developers", which you can find here.
Jerry Drumm — January 10, 2017 @ 9:03 am
Good info! Thanks for creating.