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 opens:
The dialog box shows a list of the tables in the database.
- Select the tables you want to link and click Save and close.
SQL Source Control creates a file for the table's data, but the data itself hasn't been committed yet.
- 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.