Share via


How to: Configure Deployment Settings for Database and Server Projects

You can configure settings to customize how your database project is deployed for each build configuration. The settings that you can configure include references to files that contain deployment properties. You can override deployment settings when you deploy the database project by specifying a different deployment configuration file and a different file that contains SQL command variables. You configure two groups of settings: one for your isolated development environment and one for the database project. By taking this approach, you can, for example, have different deployment settings when you deploy to your development computer.

Configure Deployment Settings

To configure deployment settings for your database project

  1. In Solution Explorer, click the database project for which you want to configure settings.

  2. On the Project menu, click ProjectName Properties, where ProjectName is the name of your database project.

    The property pages for your database project appear.

  3. Click the Deploy tab.

  4. In Configuration, click the configuration for which you want to configure settings.

  5. In Platform, click the type of computer for which you want to configure settings.

  6. In Deploy Action, click Create a deployment script (.sql) and deploy to database to both create a script and deploy the project to a database. Click **Create a deployment script (.sql)**to create a script but not actually deploy the project.

  7. In Configure deployment settings for, click Use my isolated development environment settings to configure settings for your local development environment. Click Use project settings to configure settings for the database project.

  8. In Deployment script name, type the name that you want to use for the deployment script.

  9. In Target connection, click Edit to specify a connection to the database to which you want to deploy the project.

  10. In Target database name, type the name that you want to give the database that you will deploy.

    Note

    When you specify a target connection, the target database name is updated.

  11. In Deployment configuration file, specify the file that contains the configuration that you want to use for the combination of build configuration, platform, and isolated development environment or project. You can click the file in the list, click the Browse button to specify the file name, or create another deployment configuration file. You can also click Edit to update the deployment details in the specified file. For more information about deployment details, see How to: Configure Properties for Deployment Details.

    Note

    If you create another deployment configuration file, you add it to your database project. You can view all configuration files in Solution Explorer by expanding the Properties node.

  12. In SQL command variables file, specify the file that contains the list of variables and values that you want to use for the combination of build configuration, platform, and isolated development environment or project. You can click the file in the list, click the Browse button to specify the file name, or create another file. You can also click Edit to update the variable names or values in the specified file. For more information, see How to: Define Variables for Database Projects.

    Note

    If you create another file of SQL command variables, you add it to your database project. You can view all files in Solution Explorer by expanding the Properties node.

  13. On the File menu, click Save Selected Items.

See Also

Tasks

How to: Create and Edit Configurations

How to: Create and Remove Project Dependencies

How to: Prepare and Manage Builds

How to: Build a Database Project to Generate a Compiled Schema (.dbschema) File

Concepts

Build Configurations

Build and Deploy Databases to an Isolated Development Environment

Build and Deploy Databases to a Staging or Production Environment