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/connecting-to-an-azure-sql-database.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,7 @@ This article discusses issues when using the [!INCLUDE[jdbcNoVersion](../../incl
30
30
## Details
31
31
32
32
When connecting to a [!INCLUDE[ssAzure](../../includes/ssazure_md.md)], you should connect to the master database to call **SQLServerDatabaseMetaData.getCatalogs**.
33
-
[!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. Please refer to the discussion of permissions in [sys.databases (SQL Azure Database)](http://go.microsoft.com/fwlink/?LinkId=217396) to understand **SQLServerDatabaseMetaData.getCatalogs** behavior on a [!INCLUDE[ssAzure](../../includes/ssazure_md.md)].
33
+
[!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. Please refer to the discussion of permissions in [sys.databases (SQL Azure Database)](http://go.microsoft.com/fwlink/?LinkId=217396) to understand **SQLServerDatabaseMetaData.getCatalogs** behavior on a [!INCLUDE[ssAzure](../../includes/ssazure_md.md)].
Copy file name to clipboardExpand all lines: docs/connect/jdbc/connecting-using-azure-active-directory-authentication.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -207,10 +207,12 @@ You have successfully logged on as: <your user name>
207
207
> [!NOTE]
208
208
> A contained user database must exist and a contained database user representing the specified Azure AD user or one of the groups, the specified Azure AD user belongs to, must exist in the database, and must have the CONNECT permission (except for Azure Active Directory server admin or group)
209
209
210
-
211
210
## Connecting using Access Token
212
-
Applications/services can retrieve an access token from the Azure Active Directory and use that to connect to SQL Azure Database. Note that accessToken can only be set using the Properties parameter of the getConnection() method in the DriverManager class. It can't be used in the connection string.
213
-
211
+
Applications/services can retrieve an access token from the Azure Active Directory and use that to connect to SQL Azure Database.
212
+
213
+
> [!NOTE]
214
+
> **accessToken** can only be set using the Properties parameter of the getConnection() method in the DriverManager class. It can't be used in the connection string.
215
+
214
216
The example below contains a simple Java application that connects to Azure SQL Database using access token-based authentication. Before building and running the example, perform the following steps:
215
217
1. Create an application account in Azure Active Directory for your service.
This [!INCLUDE[jdbcNoVersion](../../includes/jdbcnoversion_md.md)] sample application demonstrates how to use result set getter methods to retrieve [!INCLUDE[ssNoVersion](../../includes/ssnoversion_md.md)] 'SQL Data Discovery and Classification information' from the tables holding such information.
22
+
This [!INCLUDE[jdbcNoVersion](../../includes/jdbcnoversion_md.md)] sample application demonstrates how to use result set getter methods to retrieve [!INCLUDE[ssNoVersion](../../includes/ssnoversion_md.md)] 'SQL data discovery and classification information' from the tables holding such information.
23
23
24
24
The code file for this sample is named DataDiscoveryAndClassification.java, and it can be found in the following location:
-`adal4j`: Azure ActiveDirectory Library for Java for Azure Active Directory Authentication feature and Azure Key Vault feature (optional)
29
+
30
+
## Test Time
26
31
27
-
## Test Time
28
32
Specific projects that require either of the above two features need to explicitly declare the respective dependencies in their pom file:
29
33
30
-
***For Example:*** When using *Azure Active Directory Authentication feature*, then you need to redeclare *adal4j* dependency in your project's pom file. See the following snippet:
34
+
**_For Example:_** When using _Azure Active Directory Authentication feature_, then you need to redeclare _adal4j_ dependency in your project's pom file. See the following snippet:
35
+
31
36
```xml
32
37
<dependency>
33
-
<groupId>com.microsoft.sqlserver</groupId>
34
-
<artifactId>mssql-jdbc</artifactId>
35
-
<version>7.0.0.jre10</version>
36
-
<scope>compile</scope>
38
+
<groupId>com.microsoft.sqlserver</groupId>
39
+
<artifactId>mssql-jdbc</artifactId>
40
+
<version>7.0.0.jre10</version>
41
+
<scope>compile</scope>
37
42
</dependency>
38
43
39
44
<dependency>
40
-
<groupId>com.microsoft.azure</groupId>
41
-
<artifactId>adal4j</artifactId>
42
-
<version>1.6.0</version>
45
+
<groupId>com.microsoft.azure</groupId>
46
+
<artifactId>adal4j</artifactId>
47
+
<version>1.6.0</version>
43
48
</dependency>
44
49
```
45
50
46
-
***For Example:*** When using *Azure Key Vault feature*, then you need to redeclare *azure-keyvault* dependency and *adal4j* dependency in your project's pom file. See the following snippet:
51
+
**_For Example:_** When using _Azure Key Vault feature_, then you need to redeclare _azure-keyvault_ dependency and _adal4j_ dependency in your project's pom file. See the following snippet:
52
+
47
53
```xml
48
54
<dependency>
49
55
<groupId>com.microsoft.sqlserver</groupId>
@@ -64,44 +70,35 @@ Specific projects that require either of the above two features need to explicit
64
70
<version>1.0.0</version>
65
71
</dependency>
66
72
```
67
-
68
-
## Dependency Requirements for the JDBC Driver
69
-
70
-
### Working with Azure Key Vault Provider:
71
-
- JDBC Driver version 7.0.0
72
-
- Dependency versions: Azure-Keyvault (version 1.0.0), Adal4j (version 1.6.0), and their dependencies ([Sample Application](../../connect/jdbc/azure-key-vault-sample-version-7.0.0.md))
73
-
- JDBC Driver version 6.4.0
74
-
- Dependency versions: Azure-Keyvault (version 1.0.0), Adal4j (version 1.4.0), and their dependencies ([Sample Application](../../connect/jdbc/azure-key-vault-sample-version-6.2.2.md))
75
-
- JDBC Driver version 6.2.2
76
-
- Dependency versions: Azure-Keyvault (version 1.0.0), Adal4j (version 1.4.0), and their dependencies ([Sample Application](../../connect/jdbc/azure-key-vault-sample-version-6.2.2.md))
77
-
- JDBC Driver version 6.0.0
78
-
- Dependency versions: Azure-Keyvault (version 0.9.7), Adal4j (version 1.3.0), and their dependencies ( [Sample application](../../connect/jdbc/azure-key-vault-sample-version-6.0.0.md))
73
+
74
+
## Dependency Requirements for the JDBC Driver
75
+
76
+
### Working with Azure Key Vault Provider:
77
+
78
+
- JDBC Driver version 7.0.0 - Dependency versions: Azure-Keyvault (version 1.0.0), Adal4j (version 1.6.0), and their dependencies ([Sample Application](../../connect/jdbc/azure-key-vault-sample-version-7-0-0.md))
79
+
- JDBC Driver version 6.4.0 - Dependency versions: Azure-Keyvault (version 1.0.0), Adal4j (version 1.4.0), and their dependencies ([Sample Application](../../connect/jdbc/azure-key-vault-sample-version-6.2.2.md))
80
+
- JDBC Driver version 6.2.2 - Dependency versions: Azure-Keyvault (version 1.0.0), Adal4j (version 1.4.0), and their dependencies ([Sample Application](../../connect/jdbc/azure-key-vault-sample-version-6.2.2.md))
81
+
- JDBC Driver version 6.0.0 - Dependency versions: Azure-Keyvault (version 0.9.7), Adal4j (version 1.3.0), and their dependencies ( [Sample application](../../connect/jdbc/azure-key-vault-sample-version-6.0.0.md))
79
82
80
83
> [!NOTE]
81
84
> With v6.2.2 and v6.4.0 driver versions, the azure-keyvault-java dependency had been updated to version 1.0.0. However, the new version was not compatible with the previous version (version 0.9.7) and therefore breaks the existing implementation in the driver. The new implementation in the driver required API changes, which in turn breaks client programs that use the Azure Key Vault Provider.
82
85
83
86
> This problem has been resolved with latest driver version v7.0.0 as the removed constructor using authentication callback mechanism is added back to Azure Key Vault provider for backwards compatibility.
84
87
85
-
86
-
### Working with Azure Active Directory Authentication:
87
-
- JDBC Driver version 7.0.0
88
-
- Dependency versions: Ada4j (version 1.6.0) and its dependencies
89
-
- JDBC Driver version 6.4.0
90
-
- Dependency versions: Adal4j (version 1.4.0) and its dependencies
91
-
- JDBC Driver version 6.2.2
92
-
- Dependency versions: Adal4j (version 1.4.0) and its dependencies
93
-
- JDBC Driver version 6.0.0
94
-
- Dependency versions: Adal4j (version 1.3.0), and its dependencies
95
-
- In this version of the driver, you can connect using *ActiveDirectoryIntegrated* Authentication Mode only on a Windows operating system and using sqljdbc_auth.dll and Active Directory Authentication Library for SQL Server (ADALSQL.DLL).
96
-
97
-
From driver version 6.4.0 onwards, applications don't necessarily require using ADALSQL.DLL on Windows Operating Systems. For **Non-Windows operating systems**, the driver requires Kerberos ticket to work with ActiveDirectoryIntegrated Authentication. For more information about how to connect to Active Directory using Kerberos, see [Set Kerberos ticket on Windows, Linux And Mac](https://docs.microsoft.com/sql/connect/jdbc/connecting-using-azure-active-directory-authentication#set-kerberos-ticket-on-windows-linux-and-mac).
98
-
99
-
For **Windows operating systems**, driver looks for sqljdbc_auth.dll by default and doesn't require Kerberos ticket setup or Azure library dependencies. However, If sqljdbc_auth.dll isn't available, driver looks for Kerberos ticket for authenticating to Active Directory as on other Operating Systems.
100
-
101
-
A sample application using this feature can be found [here](../../connect/jdbc/connecting-using-azure-active-directory-authentication.md).
[JDBC Driver API Reference](../../connect/jdbc/reference/jdbc-driver-api-reference.md)
106
-
107
-
88
+
### Working with Azure Active Directory Authentication:
89
+
90
+
- JDBC Driver version 7.0.0 - Dependency versions: Ada4j (version 1.6.0) and its dependencies
91
+
- JDBC Driver version 6.4.0 - Dependency versions: Adal4j (version 1.4.0) and its dependencies
92
+
- JDBC Driver version 6.2.2 - Dependency versions: Adal4j (version 1.4.0) and its dependencies
93
+
- JDBC Driver version 6.0.0 - Dependency versions: Adal4j (version 1.3.0), and its dependencies - In this version of the driver, you can connect using _ActiveDirectoryIntegrated_ Authentication Mode only on a Windows operating system and using sqljdbc_auth.dll and Active Directory Authentication Library for SQL Server (ADALSQL.DLL).
94
+
95
+
From driver version 6.4.0 onwards, applications don't necessarily require using ADALSQL.DLL on Windows Operating Systems. For **Non-Windows operating systems**, the driver requires Kerberos ticket to work with ActiveDirectoryIntegrated Authentication. For more information about how to connect to Active Directory using Kerberos, see [Set Kerberos ticket on Windows, Linux And Mac](https://docs.microsoft.com/sql/connect/jdbc/connecting-using-azure-active-directory-authentication#set-kerberos-ticket-on-windows-linux-and-mac).
96
+
97
+
For **Windows operating systems**, driver looks for sqljdbc_auth.dll by default and doesn't require Kerberos ticket setup or Azure library dependencies. However, If sqljdbc_auth.dll isn't available, driver looks for Kerberos ticket for authenticating to Active Directory as on other Operating Systems.
98
+
99
+
A sample application using this feature can be found [here](../../connect/jdbc/connecting-using-azure-active-directory-authentication.md).
0 commit comments