SQL Source Control - 2.2

SQL Source Control

Learning SQL Source Control - 2.2

Source controlling data

SQL Source Control lets you source control your static (lookup/reference) data. Static data is the non-transactional data an application may depend on. It typically does not change frequently; an example would be a table of US states.

To source control data, first link it to source control, then commit it.

Linking associates a table's data with source control, and means that subsequent data changes are detected, and static data can be shared across the team.

To source control a table's data:

  1. In the Object Explorer, right-click the database or table with data you want to source control.
  2. Select Other SQL Source Control Tasks, then click Link/Unlink Static Data
  3. The Link/Unlink Static Data dialog box is displayed:

    You can see a list of the tables in the database and select the ones you want to link to source control.

    Note that you can only source control data in tables with a valid primary key.

    The primary key is used as the comparison key to identify corresponding rows.

  4. Select the tables you want to link and click Save and close

    A file for the table's data has now been created, but the data itself has not yet been committed. To commit the data, commit the resulting Data Link change on the Commit Changes tab.

  5. On the Commit Changes tab, ensure all Data Link changes are selected, optionally type a comment, and click Commit

    The data is committed to source control.

Note that committing and getting the latest version of data can be slow. It is therefore recommended only to source control static (lookup) data.

See also

Linking a database to source control

Committing changes

Getting the latest version

Viewing source control logs / history

Getting a specific version

Deploying a database from source control

Undoing changes

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