Database Connection
-
For the Replicat, connecting to the Listener allows the Replicat to reconnect if the primary replica performs a failover to a new instance, without having to manually edit the DSN settings to point to the new primary.
-
For the Extract connecting to the Listener not only allows reconnecting to the primary without editing the DSN to point to the new instance, but also provides the optional ability to run the Extract’s data extraction stored procedures, against a read-only secondary.
-
For both Extract and Replicat connected to an Always On environment, use the
AUTORESTART
parameter for the Manager, to restart the processes after a failover. -
To route the Extract’s data extraction queries to a read-only secondary, ensure that the DSN connection uses the Listener, that you have one or more read-only secondary replicas that are configured to handle read-only routing, and that the Extract runs with the
TRANLOGOPTIONS ALWAYSONREADONLYROUTING
parameter.-
Ensure that the Application Intent field of the DSN configuration is set to
READWRITE
and notREADONLY
-
Refer to the following Microsoft documentation on how to configure read-only routing: https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/configure-read-only-routing-for-an-availability-group-sql-server?view=sql-server-2017
-