Feedback
Did this article resolve your question/issue?

   

Article

Support for SQL Server Always On (Application Intent) Multisubnet failover with Connect for ODBC

Information

 
TitleSupport for SQL Server Always On (Application Intent) Multisubnet failover with Connect for ODBC
URL Name000044243
Article Number000143145
EnvironmentProduct: Connect64 for ODBC SQL Server Wire Protocol driver
Version:7.1,8.0
OS: All supported platforms
Database: SQL Server 2012 and later
Application : All supported applications
Question/Problem Description
Is it possible to connect to an AlwaysOn enabled SQL Server database using ApplicationIntent attribute with the Connect/Connect64 for ODBC SQL Server driver?
Does the Connect/Connect64 for ODBC SQL Server Wire Protocol driver support the SQL Server Always On Application Intent feature and Multisubnet failover?
Steps to Reproduce
Clarifying Information
Error Message
Defect NumberEnhancement
Enhancement Number
Cause
Resolution
The enhancement has been implemented. Upgrade to hot fix version 07.16.0350 (B0357, U0237) or higher v 7.1 and hot fix version 08.01.0139 (B0250, U0166) or higher for v 8.0.
Two new connection options MultiSubnetFailover and ApplicationIntent have been added to the driver.

Refer to  Connect and Connect64 for ODBC hot fix download and install instructions for instructions to download and install the hot fix.  

MultiSubnetFailover:

To utilize the new functionality, set the new connection property “MultiSubnetFailover” to 1 in the data source or connection string.

With MultiSubnetFailover enabled, set the driver’s HostName property to the DNS name of the SQL Server Always On Availability Group Listener. In an Always On environment, the listener name maps to all the ip address of the Availability Group listeners in the cluster. When connection failover occurs, the driver will ask DNS for the list of ip addresses associated with the listener name and attempt to reconnect to all of the ips in parallel. Whichever connection succeeds first will be kept and the other connection attempts discarded.

Since the driver dynamically determines the ip addresses of the listeners through DNS look up, using the MultiSubnetFailover option will cause the driver to ignore the existing AlternateServers connection property that was previously used to define the server list to which the driver should attempt to connect when failover occurs.
 

MultiSubnetFailover connection option details:

Option Name: MultiSubnetFailover

Valid values:
0 – Disabled
1 – Enabled
Default – 0

 

Application Intent:

This driver also supports the Application Intent feature of an Always on cluster. Application Intent is a request for the driver to ask the SQL Server listener for connectivity to either a read only or read/write node within the cluster. The driver has no control over the routing as it is the responsibility of the listener to route the connection to one of the nodes in the Availability Group.

If  ApplicationIntent is set to ReadOnly and the cluster only has Read/Write nodes defined, then the connection to one of those nodes will succeed. If a ReadOnly node is available in this scenario, then the connection is properly routed to that node. 
 

ApplicationIntent connection option details:

Option Name: ApplicationIntent

Valid values:
0 – READWRITE
1 – READONLY
Default – 0

The option is exposed on the Advanced tab of the Windows driver setup dialog.


NOTE: Setting MultiSubnetFailover=1 is required for ApplicationIntent connection option to work.
Workaround
Notes
References to other documentation:
DataDirect Connect/Connect64 for ODBC Windows Readme
http://media.datadirect.com/download/docs/odbc64/readme/winread.htm

DataDirect Connect/Connect64 for ODBC Unix/Linux Readme
http://media.datadirect.com/download/docs/odbc/readme/unixread.htm

The SQL Server Wire Protocol Driver, Connection Option Descriptions for SQL Server Wire Protocol
https://docs.progress.com/bundle/datadirect-connect-odbc-71/page/Connection-Option-Descriptions-for-SQL-Server-Wire-Protocol.html
 
Last Modified Date10/11/2021 7:03 PM
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.