Link a database to Mercurial

dbForge Source Control is a Microsoft SQL Server Management Studio (SSMS) add-in that is 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. By means of Source Control, you can link the database to Mercurial Repository, which is a free distributed revision control system for software developers. Mercurial is primarily a command-line driven program that remains conceptually simple and user-friendly.

This topic explains how to link a database to Mercurial.


Before linking a database to Mercurial, make sure you have Mercurial client installed.

1. In Object Explorer, right-click a database you want to link to source control.

2. Point to Source Control, 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 opens.

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

Link DB to Mercurial

5. In Source control settings, do the following:

  • To use a remote Mercurial repository, specify a URL to the Mercurial server
  • To use an existing Mercurial repository, select the Use existing local repository checkbox, and specify the path to it
  • Specify the repository name


To get proper settings, contact your system administrator.

6. Click OK to close the Source Control Repository Properties dialog.

7. Select a database development model. For more information, refer to Dedicated model and Shared model.

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

Linked DB