We have the following setup - 2 SQL servers(01 & 02) configured as AlwaysOn with a listener node/alias (LT) pointing to which server is currently primary(01/02).
What would be the best way to configure an Azure DevOps pipeline to deploy changes to the SQL servers. Along with deploying the changes the release pipeline also needs to include steps for restoring a new DB backup from another server.
My thought is to configure everything on listener(LT) this includes running the power shell script to create the AzDo client as well. But what will happen once the servers(Primary & Secondary) are switched?