All Apps and Add-ons

DB Connect, MSSQL Availability Group, Read Only Intent.

JDukeSplunk
Builder

I am trying to connect 3.1.2 to a off-node in a 3 host MS-SQL Cluster. The reason for this is to take load off of the live cluster node. The DBA has assured me that the Availability group flag is set to allow read only connections to this node. I believe him because the error message changed from the last time I tried to connect.

From this.

The target database ('DatabaseName') is in an availability group and is currently not accessible for queries. Either data movement is suspended or the availability group replica is not enabled for read access......

To this

The target database ('DatabaseName') 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."

The DBA has asked that I simply insert -Kreadonly into the connection string. The closest thing I can see to do that in DBConnect is the little check box for "read only". This does not work.

I have also tried editing the JDBC URL to include ;readonly=true with no success.

Anyone run into this before?

0 Karma
1 Solution

harsmarvania57
SplunkTrust
SplunkTrust

Can you please try with ApplicationIntent= ReadOnly, I never played in this type of environment but it might work.

View solution in original post

0 Karma

harsmarvania57
SplunkTrust
SplunkTrust

Can you please try with ApplicationIntent= ReadOnly, I never played in this type of environment but it might work.

0 Karma

JDukeSplunk
Builder

It did. Funny thing is that I had tried in the JDBC URL ApplicationInten= ReadOnly before coming here to post this question and it did not work. Only in a group webex did someone notice the missing "t".

If you convert your comment to an answer I'll gladly mark it accepted.

0 Karma

cdaly
Explorer

Where do you specify the ApplicationIntent=Read Only option? I do not see optional connection parameters in the DBConnect Input GUI.    

0 Karma

cdaly
Explorer

In order to get this working, in the DBConnection definition, Edit JDBC URL needs to be checked and the additional connection string parameter gets added at the end of the string.  ApplicationIntent=ReadOnly

ex:  jdbc:sqlserver://YourServerName:1433;databaseName=YourDatabaseName;selectMethod=cursor;integratedSecurity=true;ApplicationIntent=ReadOnly

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...