Linking a Database to a Working Folder

A working folder contains SQL script files that represent your database. It allows you to script database changes to a database folder. After saving changes, the database working folder can be source-controlled with your version control system in the same way you version-control other files.

  1. In Database Explorer, right-click a database you want to link to source control.
  2. Point to Source Control Tasks, and then click Link database to source control… on the shortcut menu.

    Link DB to Source Control

    The Link Database To Source Control wizard opens.

  3. On the Link tab of the wizard, click ‘+’ in the Source control repository field.

    Link DB Wizard

    The Source Control Repository Properties dialog box opens.

  4. Select Working Folder from the Source Control system drop-down list box.

    Link DB to Working Folder

  5. Specify a path the the database folder, and type a repository name in the corresponding fields of the dialog box. Click OK.
  6. Select a database development model. For more information, refer to the Database Development Models topic.

  7. Click Link. If a database is linked to source control successfully, a database icon in Database Explorer will be changed to show that a database is linked.

    Linked DB