How to: Deploy a Data-tier Application

Important

To create and manage databases using the latest version of Data Tier Applications (DACPAC), install the most recent release of SQL Server Data Tools from Get Started with Microsoft SQL Server Data Tools.

A data-tier application (DAC) package is single unit for deploying all of the SQL Server data-tier objects used by an application. You create a DAC package file by building a DAC project, and then use the package to deploy the DAC to an instance of SQL Server 2008 R2.

Typically, you hand off the DAC package file, and the recipient then using the Deploy Data-tier Application Wizard in SQL Server Management Studio to deploy the DAC. However, you can deploy a DAC directly to an instance of by using the DAC project deploy command.

The operation of the Visual Studio deploy operation is controlled by the deploy settings in the DAC project properties.

To change the data-tier application deployment settings

  1. In Solution Explorer, select the DAC project for which you wish to set properties.

  2. Use one of these steps to open the project property pages:

    • In Solution Explorer, right-click the DAC project and select Properties.

    • On the View menu, select Property Pages.

    • On the Project menu, select projectname Properties…

  3. Select the Deploy tab.

  4. In Destination connection string, specify a valid connection string for the instance of the SQL Server Database Engine where you wish to deploy the DAC.

  5. In Destination database name, specify the name to be given to the deployed DAC. The same name is given to the database created to hold the objects defined in the DAC.

  6. Select Validate policy on target instance if you want the DAC server selection policy evaluated when the DAC is deployed to an instance of the Database Engine.

To deploy a data-tier application by using Visual Studio

  • There are two ways to deploy a DAC project in Visual Studio:

    • On the Build menu, click Deploy DACProjectName.

    • In Solution Explorer, right-click the node for the DAC project, and then select Deploy.

    The project is built and the DAC package is deployed to the instance of the Database Engine specified in the deploy settings connection string.

    The Output window contains a report of the actions taken by the deployment.

    If you deploy the solution containing the DAC project, the DAC project is also deployed.

See Also

Concepts

Deploying Data-tier Application Packages

Building Data-tier Application Projects

Data-tier Application Project Properties