Quantcast
Channel: SQL Server High Availability and Disaster Recovery forum
Viewing all articles
Browse latest Browse all 4689

Running jobs on Always On setup

$
0
0

Hello there.

I am trying to figure out how to run jobs in a SQL Server Always On setup.

Basically, I need to add a piece of logic in my jobs that will test if the database (or replica) is the primary. If so, the job will continue, otherwise will silently stop.

Does anybody have a ready to go query that does it?


Thank you!



Viewing all articles
Browse latest Browse all 4689

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>