SQL Compare 13

Creating a rollback script

If you want to reverse a deployment, or return a database to a specific state, you can create a rollback script.

Before you run the deployment wizard:

  1. In the main window, right click in the Direction Bar, and click Switch deployment direction.
  2. Use the deployment wizard to create and save a deployment script.

For example, if you are migrating changes from WidgetStaging (the source) to WidgetProduction (the target), switching the deployment direction makes WidgetProduction the source, and the deployment script you create can be run on WidgetProduction in future to restore it to its current state.

You can also roll back a deployment by creating a snapshot when you deploy:

On the first page of the deployment wizard, select the Back up target before deployment check box. This adds a page to the wizard where you can choose to create a schema snapshot from the target. The snapshot preserves the state of the target before the deployment, and later can be used as a source, to restore the target to that state.


Didn't find what you were looking for?