Deploying Data-tier Application Packages

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.

Building a data-tier application (DAC) project creates a DAC package file that can be used to deploy the DAC to an instance of the SQL Server 2008 R2 SQL Server Database EngineĀ or SQL Azure. The DAC is most often deployed by using the Deploy Data-tier Application Wizard in SQL Server Management Studio.

Deploying a DAC from Visual Studio

The DAC project supports deploying a DAC directly from Visual Studio. The deployment action is controlled by the deploy settings in the DAC project properties. The DAC is deployed to the instance of the Database Engine specified in the deploy settings connection string.

When you deploy a DAC using Visual Studio 2010, if you specify a database that was created by deploying an earlier version of the DAC, Visual Studio will perform a DAC upgrade. In Visual Studio 2010 Service Pack 1 (SP1) or later, this will be an in-place upgrade that alters the schema of the existing database to match the schema defined in the new DAC version. In earlier versions of Visual Studio 2010, the upgrade will create a new database with the schema defined in the new DAC and then attempt to copy all of the data from the old database to the new one. For more information about DAC upgrades, see Upgrading Data-tier Applications in SQL Server 2008 R2 Books Online.

This deployment mechanism is most useful for the database developer building the DAC to test the deployment on a local instance of the Database Engine.

For more information about how to use Visual Studio to deploy a DAC, see How to: Deploy a Data-tier Application.

Deploying a DAC Using SQL Server Management Studio

The typical deployment scenario, especially for deploying a DAC into production, is for the database developer to build the DAC project to create a DAC package file, and then hand off the DAC package to the database administrator. The database administrator then uses the SQL Server Deploy Data-tier Application Wizard to deploy the DAC. This mechanism can also be used to pass the DAC to the application developers for unit testing their application, or to the testers for quality assurance testing.

For more information about deploying a DAC using the SQL Server wizard, see Deploying Data-tier Applications in SQL Server 2008 R2 Books Online.

See Also

Concepts

Data-tier Application Overview

Creating Data-tier Application Projects

Configuring the Server Selection Policy

Adding New Objects to Data-tier Applications

Building Data-tier Application Projects