SQL Source Control - 1.1

SQL Source Control

Learning SQL Source Control - 1.1

Conflicts

Conflicts occur when the latest version of an object in source control and the latest version in the database are incompatible. Conflicted objects cannot be committed or retrieved until the conflict has been resolved.

This can happen, for example, if two people modify the same stored procedure.

When a conflict occurs, the Conflict to resolve bar is displayed in the Object Differences pane:

To resolve a conflict, choose either:

  • Keep mine

    Your changes are committed to source control.

    This replaces any changes to the latest source control version that are not present in your database version.

    Or

  • Take theirs

    Your changes are discarded, and the database is updated to the latest source control version.

Note that merging is not currently supported.

To merge changes from two conflicting versions of an object, resolve the conflict, and then manually edit the object to include the changes from the other version.

To make this easier, you can copy either version of an object's creation script from the Object Differences pane, and paste it into a new query window.

To avoid conflicts, you are recommended always to get the latest version of an object before modifying it.

See also

Linking a database to source control

Committing changes

Getting the latest version

Using SVN bug IDs & TFS work items

Viewing source control logs / history

Getting a specific version

Undoing changes

Deploying a database from source control

Was this article helpful?

Search support
Forums

SQL Source Control

all SQL products

all products