To source-control data in SQL Source Control, you first link it to source control, then commit it. Linking associates a table's data with source control so subsequent data changes are detected and static data can be shared across the team.
To source-control data:
- In the Object Explorer, right-click the database or table with data you want to source control.
- Select Other SQL Source Control Tasks, then click Link/Unlink Static Data.
- The Link/Unlink Static Data dialog box is displayed:
The dialog box shows a list of the tables in the database. You can select the ones you want to link to source control.
- 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.
- On the Commit Changes tab, make sure all Data Link changes are selected, type a comment (optional), and click Commit.
The data is committed to source control.