dbForge Source Control is a Microsoft SQL Server Management Studio (SSMS) add-in designed to manage database changes in the best-known version control systems. With the help of the tool, you can version-control database schemas and data, roll back unwanted changes, handle static data conflicts, and maintain the integrity of the database.
This topic explains how to link a database to Team Foundation Version Control (TFVC).
1. In Object Explorer, right-click a database you want to link to source control and select Source Control > Link database to Source Control to open the Link Database to Source Control wizard.
2. On the Link page of the wizard, click + in the Source control repository field.
3. In the Source Control Repository Properties dialog that opens, select Team Foundation Version Control (TFVC) as a source control system from the Source control system dropdown list and do the following:
Note
The database folder to which you want to connect must exist on the server. Otherwise, the connection to source control will fail. For more information, see How to resolve the TFVC issue - No folder on the repository.
Note
Contact your system administrator to get proper settings for the server URL, username, and password.
Note
If you are using TFS/Azure DevOps Server/ Azure DevOps Services with Git-based version control, you cannot use the Team Foundation Version Control (TFVC) mode to link. Use the Git mode instead.
For more information on creating a TFVC repository in Azure DevOps and linking it to source control, refer to Creating a TFVC Repository in Azure DevOps and Linking It to Source Control.
4. Optional: Click Test to verify that the database can be successfully connected to source control.
5. Click OK to apply the changes and close the Source Control Repository Properties dialog.
6. Select a database development model: dedicated or shared.
7. Click Link to establish the connection between the database and source control.
The Refresh progress window opens automatically, showing the stages of the refresh operation. The linked database gets the following icon in Object Explorer.
Note
If linking a database to TFVC was unsuccessful, and you see the Can not find local client for TFS error, install Team Foundation Server Object Model:
Additionally, to learn how to version control SQL Server databases with the help of TFVC in Azure DevOps, watch this video.
If you’re the first person to link this database, add the database objects to source control in an ‘initial commit’. To do this, go to the Local changes section, select the objects and click Commit. For more details, see Commit changes.
If you linked a database that’s already in source control, update your database to the latest version. To do this, go to the Remote changes section, select the objects and click Get Latest. For more details, see Get the latest version.