Configuring Database Projects and Performing a Test Deployment

Before you start to perform iterative development tasks, you should configure your database project to match your target deployment environment. After you configure the database project, you can build and deploy the database to your isolated development environment to verify that the build and deployment settings are correct.

Common Scenarios

In the following table, you can find descriptions of common tasks that support this scenario and links to more information about how you can successfully complete those tasks.


Supporting Content

Learn by doing: If you complete the introductory walkthroughs, you can quickly learn about the whole process, from creating an isolated development environment through establishing a baseline and performing iterative development.

Walkthrough: Creating an Isolated Database Development Environment

Walkthrough: Establishing a Baseline for the Isolated Development Environment

Configure your database project for build: You can configure settings that control how your database project is built. For example, you can specify the location of the output of your build.

How to: Configure Build Settings for Database and Server Projects

Configure your database project for deployment:

  • You can configure deployment for any build configuration by associating a configuration with a target database, a file that contains deployment details, and a file that contains variables that affect deployment.

  • You can control the details of the deployment by modifying the file that contains deployment details. The file name extension for this type of file is .deploymentconfig.

  • You can customize variables to replace string constants at execution time.

  • You can control whether the database properties are updated when you deploy the database. You can customize deployment options to ignore certain types of differences when generating the update script.

  • You can control whether the database properties are deployed but not their values. You can customize deployment options such as differences that should be ignored or taken into account when generating the update script.

How to: Configure Deployment Settings for Database and Server Projects

How to: Configure Properties for Deployment Details

How to: Configure Database Properties for Database Projects

Build and deploy your changes to your isolated development environment: After you have modified the database or server project, you build and deploy the changes to your isolated development environment. You can then test those changes without affecting other members of your team.

Build and Deploy Databases to an Isolated Development Environment

  • Starting Team Database Development
    To manage changes to database objects and settings or to server objects and settings, you first create a database project or a server project. The project is the offline representation of the objects and settings for the database or server.

  • Verifying Database Code by Using Unit Tests
    Before you begin iterative development work on your database, you might create database unit tests to verify the existing behavior of the database. To verify the behavior, you might define a data generation plan to set the database to a known state. By using these practices, you establish a testing baseline for the product to reduce the chances that subsequent changes will break existing database or application behavior.

  • Writing and Changing Database Code
    After you put your database or server under version control and define a testing baseline, you can perform the various iterative development tasks that account for the majority of most development cycles.

  • Build and Deploy Databases to a Staging or Production Environment
    After you have tested a version of your database, you can deploy it into a staging environment and perform final verification. When you have verified that the database works as you expect, you can deploy it into a production environment.

See Also


Managing Database Change