Offline version control with ApexSQL Source Control

Applies to

ApexSQL Source Control


This article explains how to use ApexSQL Source Control for offline version control when the source control server is not accessible for some reason.


A Centralized Version Control System (CVCS) such as Subversion, Team Foundation Server, and Perforce utilize a single central repository, usually hosted on a server. Developers check out files from a central server, make changes, and commit them back to a server. A working copy of the scripts is kept in the local system, while the revision history is stored only in the central repository.

The most obvious downside of this system is the single point of failure that the centralized source control repository represents. If the central repository is not accessible (server is down or network issues), developers that are in the midst of work will be prevented to collaborate or to commit versioned changes they are working on.

As opposed to the previously mentioned source control systems, Distributed Version Control Systems (DVCS) such as Git and Mercurial will allow ApexSQL Source Control offline version control, to check out the latest changes of the scripts, as they utilizing the local repository that is fully mirrored with the central repository. Therefore, if the source control server blackout occurs, work can be continued with offline version control with the local repository without any interruptions or limitations. Versioning information is preserved and available locally and the developers can continue to commit changes to their local repositories.

ApexSQL Source Control fully utilizes the advantages of the distributed source control system via the implemented offline version control. When the Offline mode is enabled, ApexSQL Source Control allows executing every command, except the merge and conflict resolution, on the local repository: commit to online repository, browse the history, undo, and create or show labels.

To enable the offline version control in ApexSQL Source Control:

  1. Select the dedicated database that is linked to source control in the Object Explorer panel
  2. Right-click the database, and from the context menu select More source control options and the Go offline command:

    The Go offline command in the Object Explorer panel

The Action center tab opens and the Go online button appears in the upper right corner of the Action center tab:

The Action center tab for the offline mode

Quick tip icon

Quick tip:

The Go online button will be displayed when working with the Centralized Version Control System to indicate that source control server or network connections are not present, but commit to the online repository will not be possible

Developers can continue using ApexSQL Source Control without concern that changes will be lost.

Once the source control repository becomes available, developers can switch back to the online mode by click on the Go online button in the Action center tab, or choose the same option from the context menu, upon right-clicking a database in the Object Explorer panel:

The Go online command in the Object Explorer panel

In case there are changes that are committed while the offline version control mode was active, the following message appears upon switching to online mode:

Information message for offline mode

The comparing process will be done between the linked database and the offline/local repository. After the synchronization process between the linked database and the local repository is done, click the Go Online button again, to compare the linked database to the online repository. This way developers can manually synchronize changes made on a database while working in the offline mode with changes in the central repository by others, and commit them once they are satisfied.


Q: What if I try to switch to online mode while the internet connection is off or the server is down?

A: The Action center tab will try to connect and reload objects. In case the connection could not be established for any reason, the Go online button will appear again.

Q: What are the advantages of working in Offline mode?

A: The Offline mode can be useful in situations when a connection to the network is time-limited, with low speed, or with interruptions.

Q: Can I use the Offline mode in the Shared development model?

A: Yes, the Offline mode can be used in the same way in both Shared and Dedicated development models.