Link a database to Perforce

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. Source Control can help you link your database to Perforce, an enterprise version management system that handles shared file repositories, or depots. This version control system fits for large development teams and teams working on complex projects.

This topic explains how to link a database to Perforce (P4).

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, choose Perforce (P4) as a source control system from the Source control system dropdown list and do the following:

  • Specify P4PORT, User name, and Password for the Perforce server.
  • In the Workspace field, create a new workspace or select an existing one from the dropdown list.
  • By default, the repostiory name will be automatically set after specifying the workspace.

Note

It is important to ensure that the Source Control feature of dbForge Source Control uses its workspace for each database link.

It is not recommended to use this workspace from other applications.

To get proper settings for P4PORT, Username, Password and Depot, contact your system administrator.

Link DB to Perforce

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.

Link DB to Perforce

The Refresh progress window opens automatically, showing the stages of the refresh operation. The linked database gets the following icon in Object Explorer.

Linked DB

To create a new workspace

  • Under the Workspace section of the Source control settings dialog, click New.
  • In the New Workspace dialog, specify a name of the new workspace, an existing Depot, and a path to the Folder with database scripts. Click Browse to select an existing folder or create a new one.

New Workspace

Note

dbForge Source Control will work with scripts from this folder only. If you leave the Folder field empty, it will be considered that the whole depot contains database scripts. In this case, database scripts will be located in one of the Devart folders.

To select an existing workspace

  • Select an existing workspace from the dropdown list. Workspace also specifies the local folder where dbForge Studio will store database scripts.
  • Optional: Select Mapping from the dropdown list. The mapping specifies the depot and the remote folder to be used by dbForge Studio.

Note

  • Usage of existing workspace is not recommended due to possible conflicts with other applications or links.

  • For the correct work of the Source Control feature of dbForge Studio, you and your colleagues must use identical settings for P4PORT, Depot, and Folder when configuring a new Workspace.

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Source Control for SQL Server.
All Features

All features

Get acquainted with the rich features and capabilities of the Source Control in less than 5 minutes.
Request a demo

Request a demo

If you consider employing the Source Control for your business, request a demo to see it in action.
Ready to start using dbForge Source Control for SQL Server?