Keep TNIR on if the user has explicitly specified it in the connection string.
@@ -1478,10 +1478,12 @@ public class SQLServerConnection implements ISQLServerConnection {
false);
}
- // transparentNetworkIPResolution is ignored if multiSubnetFailover or DBMirroring is true.
+ // transparentNetworkIPResolution is ignored if multiSubnetFailover or DBMirroring is true and user does not set TNIR explicitly
if (multiSubnetFailover || (null != failOverPartnerPropertyValue)) {
+ if (!userSetTNIR) {
transparentNetworkIPResolution = false;
}
+ }
// failoverPartner and applicationIntent=ReadOnly cannot be used together
if ((applicationIntent != null) && applicationIntent.equals(ApplicationIntent.READ_ONLY) && failOverPartnerPropertyValue != null) {
