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