Jump to content

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


Recommended Posts

Guest Jose_Manuel_Jurado
Posted

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.

 

 

556x428vv2.png.66f9871fd75f2bbc0185bdfa57460108.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,

 

 

 

470x214vv2.png.f9d47403bb5c2cd21c77baaa3155a28e.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')

 

 

 

540x216vv2.png.e142df2118297f756bf5f79d16dbaddf.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!

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...