Linking a Database to Perforce

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

  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 Perforce (P4) from the Source Control system drop-down list box.

    Link DB to Perforce

  5. In Source control settings, specify:

    5.1. P4Port, Username and Password for the Perforce server.

    5.2. Workspace. You can create a new workspace or select an existing one from the drop-down list box.

    Note
    >It is important to ensure that the Source Control feature of dbForge Studio uses its own workspace for each database link.
    It is not recommended to use this workspace from other applications.

    To create a new workspace:

    • Click New in the Workspace section of Source control settings.
    • In the New Workspace dialog box, specify:
      • Name of the new workspace
        • an existing Depot
        • Path to the Folder with database scripts. Click ‘…‘ to select an existing folder or create a new one.

    New Workspace

    Note
    dbForge Studio 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 drop-down list. Workspace also specifies the local folder where dbForge Studio will store database scripts.
    • Optionally, select Mapping from the drop-down list box. Mapping specifies the depot and the remote folder, that will be used by dbForge Studio.

    Notes

    • 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.
    • To get proper settings for** P4Port, **Username, Password and Depot, contact your system administrator.

    5.3. 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