Lesson Learned #271: ApplicationIntent parameter when is not available option in connection string

This post has been republished via RSS; it originally appeared at: Azure Database Support Blog articles.

Today, I worked on a service request that our customer is using a 3rd party tool that has not option to specify the setting ApplicationIntent=Readonly in the connection string. The database is business critical tier with ReadScale feature enabled. 

 

As you can see in the following diagram, If the SQL connection string is configured with ApplicationIntent=ReadOnly, the application will be redirected to a read-only replica of that database or managed instance. 

Jose_Manuel_Jurado_1-1673292929626.png


In the following link you can find more information about the read only replica: Read queries on replicas - Azure SQL Database & SQL Managed Instance | Microsoft Learn

Using this 3rd party tool, there is not possible to specify additional parameter settings like we have in SQL Server Management Studio, 

 

Jose_Manuel_Jurado_0-1673292768066.png

 

Testing any available option, we suggested to include in the Host Name section the parameter after the name  servername.database.windows.net;ApplicationIntent=Readonly and it works!. After connecting to the database, I verified that we are connected to a read-only replica using the following query: SELECT DATABASEPROPERTYEX(DB_NAME(), 'Updateability') 

 

Jose_Manuel_Jurado_0-1673293497489.png

 

Most probably, in other situations will not work but, at least, in this scenario, our customer was able to, meanwhile this company works in other available option. 

 

Enjoy! 

 

 

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.