0

We have an Azure DevOps classic release pipeline setup to deploy SQL code to our SQL Server databases via SQL query files. We're running into an issue due to our databases setup with Availability Groups - when we create a release and deploy to our deployment groups the servers which are backups in the Availability Groups error out (see picture below) and mark the release as 'Partially Succeeded'.

I'd like to be able to determine which server is marked as the backup in the AG and skip this server. Any ideas if something like this is possible or any reference articles available?

Thanks!

enter image description here enter image description here enter image description here

bbeck
  • 13
  • 3
  • Availability groups replicate any changes to the database automagically. Unless you're deploying non-database changes (adding logins, creating SQL Agent jobs etc) or making physical changes to the database files, applying your SQL code to the primary will affect all of your nodes. Just cause it makes me twitch - Availability groups have secondaries (which can be readable!). They are not backups. – Patrick Hurst Aug 29 '23 at 20:32
  • Yes, the issue here is not getting changes applied to the secondary node - that is happening correctly. The problem I'm trying to solve is having my release pipeline detect which server is the primary node (from the servers in the deployment group) and ONLY deploy to that one. – bbeck Aug 29 '23 at 21:12

0 Answers0