SQL Source Control - 2.2

SQL Source Control

Learning SQL Source Control - 2.2

Undoing changes

SQL Source Control enables you to undo changes you have made to a database, but not yet committed to source control.

To undo a change:

  1. In the Object Explorer, select the object, folder, or database that has changes you want to undo.
  2. Right-click, select Other SQL Source Control Tasks and click Undo changes

    The Undo Changes dialog box is displayed:

  3. 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.

  4. Close the dialog box when the undo is complete.

    The changes are undone.

Alternatively, right-click an object on the Commit Changes tab, and click Undo Changes

Changes you cannot undo

The most common types of change SQL Source Control cannot undo are:

  • Committed changes

    You can only use SQL Source Control to undo changes you have not 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 cannot currently 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 is not 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 does not have a default value.

See also

Linking a database to source control

Committing changes

Source controlling data

Getting the latest version

Viewing source control logs / history

Getting a specific version

Deploying a database from source control

Conflicts

Using SVN bug IDs & TFS work items

Working with config files

Using filters to exclude objects

Branching and merging

Was this article helpful?

Search support
Forums

SQL Source Control

all SQL products

all products