|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.|
How to: Configure Properties for Deployment Details
When you configure the deployment settings for your database project, you specify a file that contains properties that control the details of deployment. These properties control how the deployment occurs, instead of what is being deployed. For example, you can control whether you deploy database properties together with the schema, whether the database is always re-created, and whether the database is backed up as part of the deployment process. For more information about these settings, see An Overview of Database Project Settings. You can share a properties file between multiple build and deployment configurations, or you can customize the settings for each target deployment.
To specify details that control deployment
Perform one of the following steps:
In Solution Explorer, expand your database project, expand the Properties node, and click the .deploymentconfig file that you want to modify. Open the View menu, and click Open.
Open the properties for your database project, and click the Deploy tab. In Deployment configuration file, click the file that contains the details that you want to modify, and then click Edit. For more information, see How to: Configure Deployment Settings for Database and Server Projects.
The deployment configuration details appear.
In the Deployment collation default list, perform one of the following steps:
Click Use the collation of my project to apply the collation in the database project (the source schema) to the target database when you deploy the project.
Click Use the collation of the server to apply the collation in the target database to the source schema (typically the database project) when you deploy the project.
Click Do not script the collation to keep existing collations in the source (typically the database project) and the target when you deploy the project.
The default collation affects the database collation and any columns for which you did not specify an explicit collation. If a column has an explicit collation, that collation overrides the default collation.
Select the Deploy database properties check box to deploy changes to database properties when you deploy the project. Otherwise, clear the check box.
Select the Always re-create database check box to drop and re-create the database when you deploy the database project. Clear the check box if you want to deploy updates to the schema.
If you want to preserve the data that is contained in the tables in your database, you must clear this check box.
Select the Block incremental deployment if data loss might occur check box to stop deploying updates if they would cause potential data loss. Clear the check box if deployment should continue regardless of data loss. If the Always re-create database check box is selected, this check box is ignored.
When you deploy changes that include common refactoring operations (such as renaming an object or moving an object to a different schema), the refactoring log file helps preserve the intent of your changes. For more information, see Refactoring Database Objects in a Team Environment.
Select the Execute deployment script in single-user mode check box to put the database into single-user mode when you deploy the database. Otherwise, clear this check box.
Select the Back up database before deployment check box to back up the database when you deploy the project. Clear this check box if you prefer to back up the database separately from the deployment process or if you are deploying to an isolated development environment.
Select the Generate DROP statements for objects that are in the target database but that are not in the database project check box to remove objects from the target database if they are not defined in that project when you deploy it. Otherwise, clear this check box.
Select the Do not use ALTER ASSEMBLY statements to update CLR types check box if you want the object that instantiates the common language run-time (CLR) type to be dropped and re-created when you deploy changes. Otherwise, clear this check box.
On the File menu, click Save FileName.deploymentconfig, where FileName is the name of the deployment file that you are modifying.