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
Copy file name to clipboardExpand all lines: docs/connect/jdbc/azure-key-vault-sample-version-9.2.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
---
2
2
title: Azure Key Vault sample
3
-
description: This JDBC code example demonstrates how to use Azure Key Vault as your key store provider when using Always Encrypted.
3
+
description: This JDBC code example demonstrates how to use Azure Key Vault as your key store provider for Always Encrypted.
4
4
ms.custom: ""
5
-
ms.date: 07/30/2021
5
+
ms.date: 01/31/2022
6
6
ms.prod: sql
7
7
ms.prod_service: connectivity
8
8
ms.reviewer: v-davidengel
@@ -17,7 +17,7 @@ ms.author: v-susanh
17
17
18
18
## Sample application using Azure Key Vault
19
19
20
-
This application is runnable using JDBC Driver 9.2 and above, Azure-Security-Keyvault (version 4.2.8), Azure-Identity (version 1.3.3), and their dependencies. The underlying dependencies can be resolved by adding these libraries to the Project Object Model (POM) file of the project. For more information on feature dependencies, see [Feature dependencies of the Microsoft JDBC Driver for SQL Server](feature-dependencies-of-microsoft-jdbc-driver-for-sql-server.md).
20
+
This application is runnable using JDBC Driver 10.2 and above, Azure-Security-Keyvault (version 4.3.6), Azure-Identity (version 1.4.3), and their dependencies. To resolve the underlying dependencies, add these libraries to the Project Object Model (POM) file of the project. For more information on feature dependencies, see [Feature dependencies of the Microsoft JDBC Driver for SQL Server](feature-dependencies-of-microsoft-jdbc-driver-for-sql-server.md).
This article discusses issues when using the [!INCLUDE[jdbcNoVersion](../../includes/jdbcnoversion_md.md)] to connect to an [!INCLUDE[ssAzure](../../includes/ssazure_md.md)]. For more information about connecting to an [!INCLUDE[ssAzure](../../includes/ssazure_md.md)], see:
19
+
This article discusses issues when you use the [!INCLUDE[jdbcNoVersion](../../includes/jdbcnoversion_md.md)] to connect to an [!INCLUDE[ssAzure](../../includes/ssazure_md.md)]. For more information to connect to an [!INCLUDE[ssAzure](../../includes/ssazure_md.md)], see:
-[How to: Connect to Azure SQL Using JDBC](/azure/sql-database/sql-database-connect-query-java)
24
24
25
-
-[Connecting using Azure Active Directory Authentication](connecting-using-azure-active-directory-authentication.md)
25
+
-[Connect using Azure Active Directory Authentication](connecting-using-azure-active-directory-authentication.md)
26
26
27
27
## Details
28
28
29
-
When connecting to an [!INCLUDE[ssAzure](../../includes/ssazure_md.md)], you should connect to the master database to call **SQLServerDatabaseMetaData.getCatalogs**.
29
+
To connect to an [!INCLUDE[ssAzure](../../includes/ssazure_md.md)], you should connect to the master database to call **SQLServerDatabaseMetaData.getCatalogs**.
30
30
[!INCLUDE[ssAzure](../../includes/ssazure_md.md)] doesn't support returning the entire set of catalogs from a user database. **SQLServerDatabaseMetaData.getCatalogs** use the sys.databases view to get the catalogs. Refer to the discussion of permissions in [sys.databases (Transact-SQL)](../../relational-databases/system-catalog-views/sys-databases-transact-sql.md) to understand **SQLServerDatabaseMetaData.getCatalogs** behavior on an [!INCLUDE[ssAzure](../../includes/ssazure_md.md)].
31
31
32
32
## Connections dropped
33
33
34
-
When connecting to an [!INCLUDE[ssAzure](../../includes/ssazure_md.md)], idle connections may be terminated by a network component (such as a firewall) after a period of inactivity. There are two types of idle connections, in this context:
34
+
When you connect to an [!INCLUDE[ssAzure](../../includes/ssazure_md.md)], idle connections may be terminated by a network component (such as a firewall) after a period of inactivity. There are two types of idle connections, in this context:
35
35
36
36
- Idle at the TCP layer, where connections can be dropped by any number of network devices.
37
37
38
-
- Idle by the Azure SQL Gateway, where TCP **keepalive** messages might be occurring (making the connection not idle from a TCP perspective), but not had an active query in 30 minutes. In this scenario, the Gateway will determine that the TDS connection is idle at 30 minutes and terminate the connection.
38
+
- Idle by the Azure SQL Gateway, where TCP **keepalive** messages might be occurring (which makes the connection not idle from a TCP perspective), but not had an active query in 30 minutes. In this scenario, the Gateway will determine that the TDS connection is idle at 30 minutes and terminates the connection.
39
39
40
40
To address the second point and avoid the Gateway terminating idle connections, you can:
41
41
42
-
* Use the **Redirect**[connection policy](/azure/azure-sql/database/connectivity-architecture#connection-policy)when configuring your Azure SQL data source.
42
+
* Use the **Redirect**[connection policy](/azure/azure-sql/database/connectivity-architecture#connection-policy)to configure your Azure SQL data source.
43
43
44
-
* Keep connections active via lightweight activity. This method is not recommended and should only be used if there are no other possible options.
44
+
* Keep connections active via lightweight activity. This method isn’t recommended and should only be used if there are no other possible options.
45
45
46
-
To address the first point and avoid dropping idle connections by a network component, the following registry settings (or their non-Windows equivalents) should be set on the operating system where the driver is loaded:
46
+
To address the first point and avoid dropping idle connections by a network component, set the following registry settings or their non-Windows equivalents on the operating system where the driver is loaded:
47
47
48
48
|Registry Setting|Recommended Value|
49
49
|----------------------|-----------------------|
@@ -53,12 +53,12 @@ To address the first point and avoid dropping idle connections by a network comp
53
53
54
54
Restart the computer for the registry settings to take effect.
55
55
56
-
The KeepAliveTime and KeepAliveInterval values are in milliseconds. These settings will have the effect of disconnecting an unresponsive connection within 10 to 40 seconds. After a keep alive packet is sent, if no response is received, it will be retried every second up to 10 times. If no response is received during that time, the client-side socket is disconnected. Depending on your environment, you may want to increase the KeepAliveInterval to accommodate known disruptions (like virtual machine migrations) that might cause a server to be unresponsive for longer than 10 seconds.
56
+
The KeepAliveTime and KeepAliveInterval values are in milliseconds. These settings will have the effect to disconnect an unresponsive connection within 10 to 40 seconds. If no response is received after a keep alive packet is sent, it will be retried every second up to 10 times. If no response is received during that time, the client-side socket is disconnected. Depending on your environment, you might want to increase the KeepAliveInterval to accommodate known disruptions (for example, virtual machine migrations), that might cause a server to be unresponsive for longer than 10 seconds.
57
57
58
58
> [!NOTE]
59
-
> TcpMaxDataRetransmissions is not controllable on Windows Vista or Windows 2008 and higher.
59
+
> TcpMaxDataRetransmissions isn't controllable on Windows Vista or Windows 2008 and higher.
60
60
61
-
To perform this configuration when running in Azure, create a startup task to add the registry keys. For example, add the following Startup task to the service definition file:
61
+
To perform this configuration to run in Azure, create a startup task to add the registry keys. For example, add the following Startup task to the service definition file:
62
62
63
63
64
64
```xml
@@ -81,13 +81,13 @@ shutdown /r /t 1
81
81
:done
82
82
```
83
83
84
-
## Appending the server name to the userId in the connection string
84
+
## Append the server name to the userId in the connection string
85
85
86
-
Prior to the 4.0 version of the [!INCLUDE[jdbcNoVersion](../../includes/jdbcnoversion_md.md)], when connecting to an [!INCLUDE[ssAzure](../../includes/ssazure_md.md)], you were required to append the server name to the UserId in the connection string. For example, user@servername. Beginning in version 4.0 of the [!INCLUDE[jdbcNoVersion](../../includes/jdbcnoversion_md.md)], it's no longer necessary to append @servername to the UserId in the connection string.
86
+
Prior to the 4.0 version of the [!INCLUDE[jdbcNoVersion](../../includes/jdbcnoversion_md.md)], to connect to an [!INCLUDE[ssAzure](../../includes/ssazure_md.md)], you were required to append the server name to the UserId in the connection string. For example, user@servername. Beginning in version 4.0 of the [!INCLUDE[jdbcNoVersion](../../includes/jdbcnoversion_md.md)], it's no longer necessary to append @servername to the UserId in the connection string.
87
87
88
88
## Using encryption requires setting hostNameInCertificate
89
89
90
-
Prior to the 7.2 version of the [!INCLUDE[jdbcNoVersion](../../includes/jdbcnoversion_md.md)], when connecting to an [!INCLUDE[ssAzure](../../includes/ssazure_md.md)], you should specify **hostNameInCertificate** if you specify **encrypt=true** (If the server name in the connection string is *shortName*.*domainName*, set the **hostNameInCertificate** property to \*.*domainName*.). This property is optional as of version 7.2 of the driver.
90
+
Prior to the 7.2 version of the [!INCLUDE[jdbcNoVersion](../../includes/jdbcnoversion_md.md)], to connect to an [!INCLUDE[ssAzure](../../includes/ssazure_md.md)], you should specify **hostNameInCertificate** if you specify **encrypt=true** (If the server name in the connection string is *shortName*.*domainName*, set the **hostNameInCertificate** property to \*.*domainName*.). This property is optional as of version 7.2 of the driver.
0 commit comments