Cora Knowledge Center

Support

Configure Database Connection Redirection to Enable Read-Only Queries

V8.8 and later

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}

PropertyLocation within Web.configDefault Value
availabilityGroupRoutingpersistence > providers > <relevant provider>ReadWrite

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

  1. Open the Flowtime web.config file.
  2. Under the database providersection, change the data sourcevalue to the SQL listener IP.
  3. Under the Persistencesection, locate the relevant provider.
  4. Add the availabilityGroupRouting property at the end of the provider tag, and set it to ReadOnly.
  5. 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" />

Cancel the read-only query configuration

If required, you can disable the read-only connection redirection.

  1. To disable the redirection configuration, do one of the following:
    • Delete the availabilityGroupRouting property.
    • Set the availabilityGroupRouting to ReadWrite.