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

Scheduled jobs to run ONLY on secondary node of SQL 2014 HA Cluster

$
0
0

This is on a two node HA cluster with READ ONLY routing configured on SQL 2014.

I am trying to setup a job to run only on the secondary node of a HA cluster. The job verifies that it is the secondary node(read-only) and tries to execute a command.

The jobs returns:

The target database ('xxxx') is in an availability group and is currently accessible for connections when the application intent is set to read only. For more information about application intent, see SQL Server Books Online. [SQLSTATE 42000] (Error 978). 

How do I configure the SQL Server connection from the SQL Agent to pass in ApplicationIntent=READONLY ?

Thank you


AJAY


Viewing all articles
Browse latest Browse all 4689

Trending Articles



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