These pages cover SQL Source Control 3. Documentation for older versions is also available.

SQL Source Control includes an optional beta version of the improved migration script feature. We'd love to hear what you think.

Skip to end of metadata
Go to start of metadata

You can undo changes you've made to a database that aren't committed to source control yet.

  1. In the Object Explorer, select the object, folder, or database that has changes you want to undo. Right-click, select Other SQL Source Control tasks, and click Undo changes. Alternatively, right-click an object on the Commit changes tab, and click Undo changes. The Undo changes dialog box opens:

  2. Select the objects with changes you want to undo, and click Undo Changes.
    A progress dialog box is displayed while SQL Source Control runs the script to undo the changes.
  3. Close the dialog box when the undo is complete.

    The changes are undone.

Changes you can't undo

The most common types of change SQL Source Control can't undo are:

Committed changes

You can only use SQL Source Control to undo changes you haven't committed. To undo changes that have been committed, use SQL Server Management Studio Integration Pack to update the database to a specific version, or use your source control system.

Static data changes

You can't undo a data link or a data edit. To stop source-controlling a table's data, right-click it in the object explorer, and click Link/Unlink Static Data.

On the Link/Unlink Static Data dialog box, you can choose to stop source controlling the table's data.

Dropped data

If you drop a table or column that contained data, the data isn't restored when you undo the drop.

NOT NULL columns

If you drop a NOT NULL column from a table that contained data, undoing the drop will fail if the column doesn't have a default value.

  • No labels