You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR adds support for the upcoming DNS Caching feature on the server-side. There are two phases for this feature and this is the first phase support.
When using TCP protocol, the SqlClient driver will record the DNS information such as IP address and port number in an in-memory cache if the server sends back the corresponding TDS token for this caching. The DNS information will stay in the cache during the application lifetime unless the server tells the driver to clean the cache.
In phase 1, the IP and port number are from the DNS resolution during pre-login handshake. If the DNS server fails to resolve the server name, the driver will connect with its cached IP and port if they existed. Otherwise, the connection will fail.
Add support for both .NET Framework and .NET Core.
This change requires the corresponding change in native SNI.
The caching behavior is only for TCP connections.
Need to fail the DNS Server to test this behavior.
Copy file name to clipboardExpand all lines: doc/snippets/Microsoft.Data.SqlClient/SqlConnection.xml
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1055,6 +1055,23 @@ GO
1055
1055
]]></format>
1056
1056
</remarks>
1057
1057
</RetrieveStatistics>
1058
+
<RetrieveInternalInfo>
1059
+
<summary>Returns a name value pair collection of internal properties at the point in time the method is called.</summary>
1060
+
<returns>Returns a reference of type <seecref="T:System.Collections.Generic.IDictionary" /> of (string, object) items.</returns>
1061
+
<remarks>
1062
+
<formattype="text/markdown"><![CDATA[
1063
+
1064
+
## Remarks
1065
+
When this method is called, the values retrieved are those at the current point in time. If you continue using the connection, the values are incorrect. You need to re-execute the method to obtain the most current values.
|`SQLDNSCachingSupportedState`|string|To indicate the IsSupported flag sent by the server for DNS Caching|"true", "false", "innerConnection is null!"|
1070
+
|`SQLDNSCachingSupportedStateBeforeRedirect`|string|To indicate the IsSupported flag sent by the server for DNS Caching before redirection.|"true", "false", "innerConnection is null!"|
1071
+
1072
+
]]></format>
1073
+
</remarks>
1074
+
</RetrieveInternalInfo>
1058
1075
<ServerVersion>
1059
1076
<summary>Gets a string that contains the version of the instance of SQL Server to which the client is connected.</summary>
1060
1077
<value>The version of the instance of SQL Server.</value>
0 commit comments