Use SQL Server Always-on Availability Groups

Azure DevOps Server 2020 | Azure DevOps Server 2019 | TFS 2018 - TFS 2013


Azure DevOps Server was previously named Visual Studio Team Foundation Server.

This article provides general guidelines for enabling AlwaysOn Availability Groups with Azure DevOps Server. AlwaysOn Availability Groups requires a small amount of Azure DevOps Server-specific configuration, which can help you provide high availability (HA) to Azure DevOps Server relational databases like the TFS_Configuration and TFS_Collection databases. The Azure DevOps Server-specific configuration sets the MultisubnetFailover option to true in the connection string that Azure DevOps Server uses for the data tier. This configuration is not necessary for providing HA support for reporting or SharePoint. To provide high availability to the Azure DevOps Server report server or SharePoint deployment, see the documentation for those products.

Azure DevOps Server support for AlwaysOn Availability Groups is an on or off proposition: if you use it, you must include your TFS_Configuration database as well as all of your TFS_Collection databases in the availability group. If you add a project collection in the future, the database for that collection must be added to the availability group in SQL Server.

You can have more than one SQL Server availability group.

See the SQL Server documentation for guidance about configuring AlwaysOn Availability Groups. Azure DevOps Server does not require any specific AlwaysOn Availability Group configuration. Use the configuration that best meets your team’s needs and the recommendations found in SQL Server guidance. For more information, see Getting started with AlwaysOn Availability Groups (SQL Server).

Set up a new Azure DevOps Server installation with AlwaysOn Availability Groups

The following is a high-level walkthrough of the steps required to implement AlwaysOn Availability Groups during Azure DevOps Server installation.


To set the MultisubnetFailover option to true in the connection string for an already running deployment of Azure DevOps Server, use the RegisterDB command of TFSConfig with the /usesqlalwayson argument. You'll need to use the TFSService Control Command to stop and start Azure DevOps Server before you can set the MultisubnetFailover option. For more information, see RegisterDB command and TFSServiceControl command.

One: set up AlwaysOn Availability Groups

The SQL Server AlwaysOn Availability Group must be ready before you install Azure DevOps Server. For more information, see Getting started with AlwaysOn Availability Groups (SQL Server).

Two: install Azure DevOps Server by using the Advanced wizard

Select AlwaysOn checkbox

If you’re installing Azure DevOps Server for the first time, use the Advanced configuration wizard, which gives you access to the SQL AlwaysOn Availability Group check box (shown above). On this screen, enter the Availability Group Listener in the SQL Server Instance text box. Azure DevOps Server creates TFS_Configuration and the DefaultCollection databases on the Primary replica of your AlwaysOn Availability Group. The databases for SharePoint are also created, if you allow Azure DevOps Server to install SharePoint Foundation.


Integration with SharePoint Products has been deprecated for TFS 2018 and later versions.


You can also access the SQL AlwaysOn Availability Group check box by using the Application-Tier Only or Upgrade wizards. For more information, see How to: Create an Azure DevOps Server farm (high availability) or Upgrade requirements.

Three: add the new Azure DevOps Server databases to the AlwaysOn Availability Group

Add Azure DevOps Server databases to AlwaysOn Availability Group

You’ll need to back up any databases that you want to add to the AlwaysOn Availability Group to bring them into compliance for data stored in an AlwaysOn Availability Group. Next, use the Availability Group wizard to add the databases to the group. For more information, see Creation and configuration of Availability Groups (SQL Server), and Use the Availability Group Wizard (SQL Server Management Studio).


If you add a new project collection to Azure DevOps Server, remember to add the database for the collection to your availability group in SQL Server. You cannot have some databases for project collections in and some outside the availability group.

AlwaysOn Availability Groups support for reporting and SharePoint

The Azure DevOps Server-specific configurations described in this article are not necessary to provide HA support for reporting or SharePoint. To provide AlwaysOn support for those features, use the guidance available for those products, or implement another Azure DevOps Server-supported HA feature.

Reporting and AlwaysOn Availability Groups

SharePoint and HA