Deploy query to MSSQL in HA configuretion

I want to deploy a sql query only to the primary replica in my MSSQL HA Cluster.
But i cant seem to only target the primary?

Hi @ksj!

I’m happy to help you with this. Are you able to provide some additional detail about how your SQL cluster is configured? Is it a Primary DB with secondary replication, or is it a failover cluster with a Listener?

1 Like

its a “failover cluster with a Listener”, and i know that i can target the listner with the query, but it will be sendt twice (one from each server), but that not an option when trying to update som tabels

Hi @ksj,

Just stepping in for Justin while he’s offline from the Australia based team!

It sounds like there might be a misconfiguration such as multiple tentacles/workers, targeting both nodes when a deployment occurs.

I’d recommend checking out the following doc pages about DB deployments which mention:

High-availability groups or clusters have 1 to N nodes, and the nodes are kept in sync by replication. You only need to deploy to the primary node, and replication will apply the changes to all the nodes. Installing a Tentacle on each node will not work as Octopus Deploy will see multiple Tentacles and attempt to deploy to multiple nodes.

Hope that helps but feel free to reach out with any questions at all!

Best Regards,


Thanks That solved my problem :slight_smile:


This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.