Forum Discussion

HSBHSB's avatar
HSBHSB
Copper Contributor
Jun 18, 2021

Change Azure Devops Source Control Database

We have two SQL Servers, Server A and Server B that are part of an Always On availability group. All of our Team Projects and Devops point directly to Server A.

 

Server A is currently down. We want to change it so Devops points to our Listener connection ListenerAG as we can't even open up our projects in Visual Studio as it's trying to read from the database on Server A. ListenerAG automatically determines which server/node is Primary and will redirect to that. All of our configuration databases are synchronized between the two through Always On.

 

We have 3 databases that are part of the AG used by DevOps: AzureDevOps_Configuration, AzureDevOps_Collection1, AzureDevOps_Collection2.

 

Is there an easy way while logged onto the host of Devops (Server C) to tell it to use ListenerAG instead of ServerA for these databases?

 

EDIT: I've tried replying with info that I've found but the replies aren't saving. From Server C that hosts Devops, can I run the following to accomplish this?

tfsconfig registerDB /sqlInstance: ListenerAG /databaseName: AzureDevOps_Configuration

Resources