Create rollback scripts

In order to create a rollback script in dbForge Data Compare for SQL Server, you will need to perform the comparison with the same settings as when comparing databases to get a deployment one. The only difference is to change the synchronization direction and finally generate the script. See how to do this step-by-step below:

1. Having performed the comparison, right-click the generated .dcomp file.

2. Click Change Synchronization Direction.

Change Synchronization Direction

3. You will see that the synchronization arrow now turns red and faces the opposite direction.

Change Synchronization Direction

4. Click the red arrow.

5. In the Data Synchronization Wizard that opens, choose the most appropriate option.

6. Click Synchronize.

Data Synchronization Wizard

If you have chosen Open the synchronization script in the internal editor, the generated script will open as a separate tab in dbForge Data Compare for SQL Server:

Internal Editor

You can also Save the script to a file on your computer.

Another way to create a rollback script is to swap Source and Target settings at the beginning of the comparison:

Swap Source and Target

1. By swapping Source and Target you will simply change the direction of the comparison and synchronization.

Note

It is important to keep in mind that this method will reset any manual mapping that was previously set. Thus, you will have to manually specify the same mapping as before.

Mapping

2. Once done, click Compare.

3. Review the generated .dcomp file.

4. Click the green arrow to invoke the Data Synchronization Wizard:

Synchronization

5. In the Data Synchronization Wizard that opens, choose the same options as you used to generate the deployment script.

6. Click Synchronize.

Schema Synchronization Wizard

If you have chosen Open the synchronization script in the internal editor, the generated script will open as a separate tab in dbForge Data Compare for SQL Server: Internal Editor

You can also Save the script to a file on your computer.

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Data Compare for SQL Server.
All Features

All features

Get acquainted with the rich features and capabilities of the Data Compare in less than 5 minutes.
Request a demo

Request a demo

If you consider employing the Data Compare for your business, request a demo to see it in action.
Ready to start using dbForge Data Compare for SQL Server?