How to link a database to SVN

This topic explains how to link a database to Subversion (SVN).

1. In Database Explorer, right-click the database you want to link to source control and select Source Control > Link Database to Source Control.

Alternatively, select Database > Link Database to Source Control on the ribbon.

2. On the Link page of the Link Database to Source Control dialog, click Create New Repository Create New Repository in the Source control repository field.

Note

The previously linked repository will be selected by default.

3. In the Source Control Repository Properties dialog, choose Subversion (SVN) as a source control system from the Source control system dropdown list and specify the following parameters:

  • Server URL, User name, and Password for the SVN server.
  • Database folder. To do this, click Browse Browse to choose the folder where a SQL script will be stored.

Note

The Database folder parameter determines which directory corresponds to the database being compared, and all SQL files added to it will be used in the analysis and comparison. Therefore, files with duplicate objects will cause errors. However, it is possible to prevent this issue by splitting database files and related files into two different levels:

  • Optional: Repository name is automatically derived from the server URL. However, you can specify a different name of the repository.

You can contact your system administrator to get proper settings for Server URL, User name, and Password.

Note

When you create a new project, the Database folder parameter defines the directory, which contains only the database files. Any SQL files added to this directory are automatically integrated into the project’s analysis and comparison processes. However, duplicate files can lead to errors.

To avoid these issues, it is recommended to store database files separate from other files at different levels. For example, the Database folder parameter refers to the following path - $/SourceControlSQLServer/AdventureWorks2022, where SourceControlSQLServer is Level1 that keeps all additional scripts and files, while AdventureWorks2022 is Level2 that stores only the database files that will be analyzed by a version-control system.

Link DB to SVN

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

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

Linked DB

Download dbForge Studio for SQL Server and try it absolutely free for 30 days!

Want to Find out More?

Overview

Overview

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

All features

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

Request a demo

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