V9.1
Overview
Starting with Cora SeQuence V8.8, you can configure the ApplicationIntent property to enable read-only database queries.
In a high-availability SQL solution, if you don’t specify the ApplicationIntent property, the default mode is ReadWrite. When you set up the ApplicationIntent property for a data provider, the ApplicationIntent property is added to the connection string used to connect to the database, and enables read-only connection redirection for Always On availability groups. This feature is useful to improve system performance, and can be configured for any of the Cora SeQuence providers, such as portal view providers or providers used to retrieve read-only data.
In Cora SeQuence, the ApplicationIntent property is named availabilityGroupRouting.
Configuration
To enable read-only database queries, you first set up a read-only connection string property and then set the availabilityGroupRouting property to ReadOnly.
| Property | Location in the Flowtime Web.config | Values |
|---|---|---|
readonlyConnectionString | persistence > database | Same as the default database connection string |
availabilityGroupRouting | persistence > providers > <relevant provider> | ReadWrite (default) ReadOnly |
Prerequisites
Before you configure the connection redirection, make sure that:
- Your SQL database setup supports connection redirection for Always On availability groups.
For more information, see this article. - You have the SQL listener IP.
Enable connection redirection
- Open the Flowtime
web.configfile. - Under the
persistence>databasesection, add a new property namedreadonlyConnectionString. - In the
readonlyConnectionStringproperty, change thedata sourcevalue to the SQL listener IP. - Under the
Persistencesection, locate the relevant provider. - Add the
availabilityGroupRoutingproperty at the end of the provider tag, and set it to ReadOnly. - Save the file.
Sample
<persistence>
<database provider="System.Data.SqlClient" credentials="XXX" connectionString="MultipleActiveResultSets=true;initial catalog=DBName;persist security info=True;data source=DBserverName;packet size=4096;" commandTimeout="1200" readonlyConnectionString="MultipleActiveResultSets=true;initial catalog=DBName;persist security info=True;data source=SQLListenerIP;packet size=4096;" />
<providers>
<add type="PNMsoft.Sequence.Data.Sql.SqlAuthenticationDataProvider, PNMsoft.Sequence.Data, Version=8.0.0.0, Culture=neutral, PublicKeyToken=0a1a1b90c1c5dca1"availabilityGroupRouting="ReadOnly
" />Disable the read-only query configuration
If required, you can disable the read-only connection redirection.
- To disable the redirection configuration, do one of the following:
- Delete the
availabilityGroupRoutingproperty. - Set the
availabilityGroupRoutingto ReadWrite.
- Delete the
V8.8
Overview
Starting with Cora SeQuence V8.8, you can configure the ApplicationIntent property to enable read-only database queries.
In a high-availability SQL solution, if you don’t specify the ApplicationIntent property, the default mode is ReadWrite. When you set up the ApplicationIntent property for a data provider, the ApplicationIntent property is added to the connection string used to connect to the database, and enables read-only connection redirection for Always On availability groups. This feature is useful to improve system performance, and can be configured for any of the Cora SeQuence providers, such as portal view providers or providers used to retrieve read-only data.
Configuration
In Cora SeQuence, the ApplicationIntent property is named availabilityGroupRouting. When you add the availabilityGroupRouting property to a data provider, the resulting connection string for that provider is set to ApplicationIntent={Value}
| Property | Location within Web.config | Default Value |
|---|---|---|
availabilityGroupRouting | persistence > providers > <relevant provider> | ReadWrite |
Prerequisites
Make sure that your SQL database setup supports connection redirection for Always On availability groups.
For more information, see this article.
Enable connection redirection
- Open the Flowtime
web.configfile. - Under the
database providersection, change thedata sourcevalue to the SQL listener IP. - Under the
Persistencesection, locate the relevant provider. - Add the
availabilityGroupRoutingproperty at the end of the provider tag, and set it to ReadOnly. - Save the file.
Sample
<add type="PNMsoft.Sequence.Data.Sql.SqlAuthenticationDataProvider, PNMsoft.Sequence.Data, Version=8.0.0.0, Culture=neutral, PublicKeyToken=0a1a1b90c1c5dca1"availabilityGroupRouting="ReadOnly" />
Disable the read-only query configuration
If required, you can disable the read-only connection redirection.
- To disable the redirection configuration, do one of the following:
- Do one of the following:
- Delete the
availabilityGroupRoutingproperty. - Set the
availabilityGroupRoutingto ReadWrite.
- Delete the