Connection string ApplicationIntent MSSQL

Hi!

I need to connect to a MSSQL database that only allow connections if ApplicationIntent is set to ReadOnly.

I added in the connection extra properties after databaseName=XXXXX; ApplicationIntent=ReadOnly....but i cant make it work. the error says that the db only allow connection if the ApplicationIntent is set to ReadOnly.
I can connect from mssql management studio using ApplicationIntent in the extra options or from any othe application where I write the connection String but cant manage to make it work from Ignition.
The jdbc driver is the 7.2.1

This StackOverflow post suggests you need to connect to one of the AGL hosts and not the primary host... is that relevant to your situation?

Not really. I can connect to the AGL but i would need to use the ApplicationIntent anyway as we want to hit the secondary db. If i connect to the AGL trough an applocation and put applicationIntent=ReadOnly then i hit the secondary. The queries goes to the secondary, but if I put ApplicationIntent on Ignition and connect to the AGL all the queries run trough the primary db. Thats why we thought we might can connevt direct to the secondary and try

@Kevin.Herron fyi we made it work. On the extra properties beside databaseName and applicstionIntent we needed the keyword server as well. So the extra properties are dtabaseName=myDB;applicationIntent=ReadOnly;server=AGL

Connected to the AGL and we hit the secondary. Without the server on the extra properties it doesnt connect as readonly

1 Like