Linking a Database to TFS

This topic explains how to link a database to Team Foundation Server (TFS).

  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 Team Foundation Server (TFS) from the Source Control system drop-down list box.

    Link DB to TFS

  5. In Source control settings, specify:

    • Server URL, Username and Password for the TFS server. Alternatively, select the Use Windows authentication check-box to use Windows authentication when logging in TFS.

      Note
      >To get proper settings for Server URL, Username and Password, contact your system administrator.

    • Database folder in TFS where SQL script will be stored.
    • Repository name.
  6. Click OK to close the Source Control Repository Properties dialog box.
  7. Select a database development model. For more information, refer to the Database Development Models topic.
  8. 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

Note
If linking a database to TFS was unsuccessful, and you see the ‘Can not find local client for TFS’ error, install Team Foundation Server Object Model: