Using the Deployment Wizard
Published 13 December 2022
When you have selected the objects that you want to include in the deployment, use the Deployment Wizard to create the SQL script that will deploy the databases.
To start the Deployment Wizard, click Deployment Wizard.
The wizard has three steps:
- Choose deployment method
Create and save a script, perform the deployment from SQL Data Compare, or update a scripts folder. - Configure Backup (optional step)
If you do not choose to back up on the first page, this step is not part of the wizard. - Using the Deployment Wizard
View the deployment script, review a summary of the deployment actions, and see any warnings.
If SQL Data Compare is unable to deploy the data sources, an error message is displayed, and where possible all changes are rolled back. However, if you've selected the project option Don't use transactions in SQL scripts, the changes are not rolled back.
Deploying backups
When you have selected a backup as the target, the deployment wizard creates a script to update the database from which the backup was created. Backups cannot be modified directly.
When a backup is the source, and a database is the target, the database can be deployed with the backup.
For more information, see Working with backups
Deploying scripts folders
When a scripts folder is the target, you can either:
- Create a deployment script to update the database from which the scripts folder was created, or
Update files in the scripts folder directly
When an object is dropped during deployment, its script file is not deleted.
If a scripts folder is the target, and any of the script files that will be modified are designated as read-only, a warning is displayed. If you click Yes to continue, these files will be made writable so that they can be modified. This may occur, for example, when you are working with a source control system that sets files to read-only status in some situations.
For more information, see Working with scripts folders
1. Choose deployment method
On the first page of the Deployment Wizard, you can choose to create and save a deployment script, perform the deployment using SQL Data Compare, or update a scripts folder:
Create a deployment script
If you choose to create a deployment script, on the Review page you can save a copy of the script or open it in your SQL editor.
To change the application you use to open the script, click Change. The Application Options dialog box is displayed, and you can specify the default application used to edit SQL Scripts.
Deploy using SQL Data Compare
If you choose to deploy using SQL Data Compare, on the Review page you can save a copy of the script and exit the wizard, or click Deploy Now to perform the deployment.
If the target is a scripts folder, this option is instead replaced by Update the scripts folder, and the SQL script files in the target are modified when you deploy.
If you select Back up target before deployment, a step is added to the Deployment Wizard allowing you to specify details of the backup.
2. Configure backup (optional step)
If you selected the option to back up before deployment, the Configure backup page is added to the Deployment Wizard.
If the target is a database, this page allows you to perform a backup before deployment.
If the target is a scripts folder, this option is not available.
Perform a full backup
When the target is a database, you can perform a full backup. In the Back up using box, select:
- Native SQL Server to create a backup using the native SQL Server BACKUP command
- Redgate SQL Backup to create a backup using SQL Backup version 4 or laterNote that to use Redgate SQL Backup, you must have the SQL Backup server components installed on the SQL Server instance of the target database.
For more information, see Backing up before deployment.
3. Review
There are three tabs on the Review page:
- Deployment script shows the script to deploy the data sources. You can search the script, save it, or copy it to the clipboard.
- Summary shows a synopsis of the actions in the deployment script. You can view the summary grouped by the objects affected, by the type of modification, or by the order in which the script modifies the target.
- Warnings shows a list of any warnings about unexpected behavior that may occur when you deploy the databases.
For more information, see: Deployment warnings.
If you are updating or creating a scripts folder, the Files tab lists the object creation and data script files modified or created during deployment.
When you have reviewed the script, click Deploy Now to perform the deployment.