SQL Source Control 4

TFS

This page applies to SQL Source Control 4.1 and later.

This page explains how to link your database to an existing Team Foundation Server (TFS) repository.

  1. In the Object Explorer, select the database you want to link to source control.
  2. In SQL Source Control, on the Setup tab, make sure Link to my source control system is selected and click Next:


  3. On the Choose your source control system page, select Team Foundation Server (TFS) and click Next
    The Link database to source control dialog box opens:
     

  4. In the right-hand pane, in the Server URL field, specify the URL of your Team Foundation Server. If you use a non-standard port, specify this in the URL (eg http://myurl:8080/tfs).

  5. In the Database folder field, enter the folder in TFS where SQL Source Control will store SQL scripts.
    If you're the first person to link the database to source control, specify an empty folder. If someone has already linked this database to source control, specify the folder they used. 

  6. If you want to use migration scripts, under Migration scripts folder, specify an existing, empty folder in the repository.
    The folder can't be in the database folder. For example, you can use Repository folder\Migration scripts, but not Repository folder\Database folder\Migration scripts.

  7. If you're linking to a database that will be used by multiple developers, make sure Shared database is selected. For more information, see Database development models

  8. Click Link.
    The database is linked to source control. The database icon in the Object Explorer changes to show that the database is linked:

If you're the first person to link this database, add the database objects to source control. To do this, go to the Commit changes tab and commit the objects.

If you linked a database that's already in source control, update your database to the latest version. To do this, go to the Get latest tab and get the changes.


Didn't find what you were looking for?