SQL Server Source Control
Placing database objects under source control is a simple and effective way to track and manage database changes
in popular source control systems without having to break your workflow. The tool allows linking a SQL Server database
to the source control, working folder repository or through the command-line interface and work with a separate local database copy or share the same copy (depending on the database
development model). The Source Control functionality built into dbForge
Studio for SQL Server helps you to preserve the database integrity, ensure better collaboration
between teams, and to cope with database deployment much more efficiently.
- Support for a shared or a dedicated database development model
- View and control changes history
- Rollback changes safely in case of errors
- Visually highlight differences in the code of the local and remote database copies
- Compare versions to detect the changes to the database
- Enhance database development and reduce errors by testing the changes in a sandbox
- Have the latest version of the database
- Avoid data loss when deploying the database
Support for All Popular Version Control Systems
Using the Source Control tool, you can link your databases to a source control repository in the following systems:
- Subversion (SVN)
- Microsoft Azure DevOps (Team Foundation Version Control (TFVC))
- Git (including GitHub)
- Perforce (P4)
- SourceGear Vault
In addition, a developer can choose a database development model: either dedicated or shared. Depending on the database development
model, developers can work a local cloned copy of the database or the same database copy and repository updated with the latest database version.
For more information about the differences between these models, see Shared vs Dedicated Development Models: Key Differences.
Source-Controlling a Working Folder
If you want to link a database to the local file created with the help of third-party tools, you can use the working folder
feature as a source control repository. A working folder is a set of SQL script files to create and manage database objects.
The tool allows you to source-control a SQL database working folder with your version control
system in the same way as you version-control other files. In the Source Control Manager, you can view the changes on the grid, commit them or revert,
or identify the owner. The Manager allows you to view the differences between the local and remote copies highlighted in different colors.
Source Control Manager
Perform essential SQL version control tasks visually in a handy interface.
In particular, the Source Control Manager allows you to:
- Commit local changes to a source control repository
- Add comments to your commits
- Get the latest changes from the remote source control repository
- Resolve conflicts
- Compare a local version with the remote one to detect the differences in the code
The tool includes the Changes History document functionality that enables you to:
- View changes history for the entire SQL database or for separate database objects
- View details of each commit, including revision ID, date, author and comments
- Check a list of objects that were modified in each commit
- Identify DDL differences for each database object
- Compare the local version of the database object with the remote one
To view the changes history, right-click in the Database Explorer and select Source Control > View Changes History.
The Source Control tool allows version-controlling static table data, committing, tracking, and reverting changes (if needed), resolve static data conflicts,
and maintain the database integrity.
To connect to static table data to a repository, right-click the database containing the static data and select Source Control > Link/Unlink
static data on the shortcut menu.