Data-tier Application Lifecycle Tutorial

This tutorial is intended for users who are new to data-tier applications (DAC), but are familiar with database concepts, Transact-SQL statements, and Visual Studio. It will help new users get started by showing them the basic steps in creating, deploying, monitoring, and upgrading a DAC.

What You Will Learn

This tutorial shows you how to perform the basic steps in creating, deploying, managing, and upgrading a DAC using the features in SQL Server 2008 R2 and Microsoft Visual Studio 2010.

A DAC defines the instance level objects, schemas, and database objects used by a three-tier or client-server application. The DAC is created by using a DAC project in Visual Studio, where a database developer defines the objects used by the application associated with the DAC. When the project is then built, Visual Studio compiles a DAC type, or definition, that specifies the objects from the DAC project. The DAC definition is built into a DAC package file, which is a single unit of deployment similar to an application executable file. The DAC package is used to deploy the DAC to an instance of the Database Engine. You can then manage and monitor the DAC using the Object Explorer and Utility Explorer in SQL Server Management Studio. After the DAC has been deployed, development can continue on a new version of the DAC. The new version is built into a DAC package that can be used to either deploy a new instance of the DAC, or upgrade the previously deployed DAC.

The tutorial assumes that you have installed Visual Studio 2010 and two instances of the Database Engine. One of the instances is where you will deploy the DAC, and will be referred to as the test instance. The test instance can be SQL Server 2008 Service Pack 2 or later. The second instance must be running SQL Server 2008 R2 and be configured as a utility control point (UCP). For more information, see How to: Create a SQL Server Utility Control Point (SQL Server Utility).

You must use the SQL Server 2008 R2 versions of the SQL Server wizards and SQL Server Management Studio to perform DAC operations.

You will perform the following tasks:

  • Enroll the test instance in the SQL Server Utility and create a simple sample database on that instance.

  • Create a simple DAC project in Visual Studio, and build the project to create a DAC package.

  • Use the Deploy Data-tier Application Wizard to deploy a DAC instance.

  • View the properties of the deployed DAC instance in the Object Explorer.

  • View the DAC resource utilization information in the Utility Explorer.

  • Edit the DAC project in Visual Studio, and built it to create a new version of the DAC package.

  • Use the DAC package to upgrade the DAC instance.

  • Use the Delete Data-tier Application Wizard to delete the deployed DAC.

This tutorial is divided into six lessons.

Requirements

To complete this tutorial, you should be familiar with the Transact-SQL language and how to use SQL Server Management Studio, including the Database Engine Query Editor. You must be a member of the sysadmin fixed server role.

Your system must have the following installed:

  • Two instances of the Database Engine. One instance must be SQL Server 2008 R2 and configured as a Utility Control Point. The other instance can be SQL Server 2008 SP2 or later.

  • The SQL Server 2008 R2 version of SQL Server Management Studio.

  • Microsoft Visual Studio 2010

  • Microsoft Internet Explorer 6 SP1 or a later version

    Note

    When you review the tutorials, we recommend that you add the Next and Previous buttons to the document viewer toolbar. For more information, see Adding Next and Previous Buttons to Help.