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/setting-the-connection-properties.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
-
---
1
+
---
2
2
title: "Setting the Connection Properties | Microsoft Docs"
3
3
ms.custom: ""
4
-
ms.date: "01/19/2017"
4
+
ms.date: "04/11/2017"
5
5
ms.prod: "sql-non-specified"
6
6
ms.reviewer: ""
7
7
ms.suite: ""
@@ -53,7 +53,7 @@ manager: "jhubbard"
53
53
|accessToken|String|null|Use this property to connect to a SQL database using an access token. **accessToken** cannot be set using the connection URL.|
54
54
|applicationIntent|String|ReadWrite|Declares the application workload type when connecting to a server. Possible values are **ReadOnly** and **ReadWrite**. For more information, see [JDBC Driver Support for High Availability, Disaster Recovery](../../connect/jdbc/jdbc-driver-support-for-high-availability-disaster-recovery.md).|
55
55
|applicationName|String<br /><br /> [<=128 char]|null|The application name, or "[!INCLUDE[jdbcNoVersion](../../includes/jdbcnoversion_md.md)]" if no name is provided. Used to identify the specific application in various [!INCLUDE[ssNoVersion](../../includes/ssnoversion_md.md)] profiling and logging tools.|
56
-
|authentication|String|NotSpecified|Beginning with Microsoft JDBC Driver 6.0 for SQL Server, this optional property indicates which SQL authentication method to use for connection. Possible values are **ActiveDirectoryIntegrated**, **ActiveDirectoryPassword**, **SqlPassword** and the default **NotSpecified**.<br /><br /> Use **ActiveDirectoryIntegrated** to connect to a SQL Database using integrated Windows authentication.<br /><br /> Use **ActiveDirectoryPassword** to connect to a SQL Database using an Azure AD principal name and password.<br /><br /> Use **SqlPassword** to connect to a SQL Server using **userName**/**user** and **password** properties.<br /><br /> Use **NotSpecified** if none of these authentication methods is needed.<br /><br /> **Important:** If authentication is set to ActiveDirectoryIntegrated, the following two libraries will need to be installed: `SQLJDBC_AUTH.DLL (available in the JDBC driver package)` and `Azure Active Directory Authentication Library for SQL Server (ADALSQL.DLL)` It is available in multiple languages (both x86 and amd64) from the download center at [Microsoft Active Directory Authentication Library for Microsoft SQL Server](https://www.microsoft.com/en-us/download/details.aspx?id=48742). The JDBC driver only supports version **1.0.2028.318 and higher** for the ADALSQL.DLL.<br /><br /> **Note:** When authentication property is set to any value other than **NotSpecified**, the driver by default uses Secure Sockets Layer (SSL) encryption.<br /><br /> For information on how to configure Azure Active Directory authentication visit [Connecting to SQL Database By Using Azure Active Directory Authentication](https://azure.microsoft.com/en-us/documentation/articles/sql-database-aad-authentication/).|
56
+
|authentication|String|NotSpecified|Beginning with Microsoft JDBC Driver 6.0 for SQL Server, this optional property indicates which SQL authentication method to use for connection. Possible values are **ActiveDirectoryIntegrated**, **ActiveDirectoryPassword**, **SqlPassword** and the default **NotSpecified**.<br /><br /> Use **ActiveDirectoryIntegrated** to connect to a SQL Database using integrated Windows authentication.<br /><br /> Use **ActiveDirectoryPassword** to connect to a SQL Database using an Azure AD principal name and password.<br /><br /> Use **SqlPassword** to connect to a SQL Server using **userName**/**user** and **password** properties.<br /><br /> Use **NotSpecified** if none of these authentication methods is needed.<br /><br /> **Important:** If authentication is set to ActiveDirectoryIntegrated, the following two libraries will need to be installed: **SQLJDBC_AUTH.DLL** (available in the JDBC driver package) and Azure Active Directory Authentication Library for SQL Server (**ADALSQL.DLL**) It is available in multiple languages (both x86 and amd64) from the download center at [Microsoft Active Directory Authentication Library for Microsoft SQL Server](https://www.microsoft.com/en-us/download/details.aspx?id=48742). The JDBC driver only supports version **1.0.2028.318 and higher** for the ADALSQL.DLL.<br /><br /> **Note:** When authentication property is set to any value other than **NotSpecified**, the driver by default uses Secure Sockets Layer (SSL) encryption.<br /><br /> For information on how to configure Azure Active Directory authentication visit [Connecting to SQL Database By Using Azure Active Directory Authentication](https://azure.microsoft.com/en-us/documentation/articles/sql-database-aad-authentication/).|
57
57
|authenticationScheme|String|"NativeAuthentication"|Indicates which kind of integrated security you want your application to use. Possible values are **JavaKerberos** and the default **NativeAuthentication**.<br /><br /> When using **authenticationScheme=JavaKerberos**, you must specify the fully-qualified domain name (FQDN) in the **serverName** or **serverSpn** property. Otherwise, an error will occur (Server not found in Kerberos database).<br /><br /> For more information on using **authenticationScheme**, see [Using Kerberos Integrated Authentication to Connect to SQL Server](../../connect/jdbc/using-kerberos-integrated-authentication-to-connect-to-sql-server.md).|
58
58
|columnEncryptionSetting|String<br /><br /> ["Enabled"|"Disabled"]|Disabled|Set to "Enabled" to use the Always Encrypted (AE) feature beginning with Microsoft JDBC Driver 6.0 for SQL Server. When AE is enabled, the JDBC driver transparently encrypts and decrypts sensitive data stored in encrypted database columns in the SQL Server.<br /><br /> See [Using Always Encrypted with the JDBC Driver](../../connect/jdbc/using-always-encrypted-with-the-jdbc-driver.md) for more details.<br /><br /> **Note:** Always Encrypted is available with SQL Server 2016 or later versions.|
59
59
|databaseName, database|String<br /><br /> [<=128 char]|null|The name of the database to connect to. If not stated, a connection is made to the default database.|
@@ -67,7 +67,7 @@ manager: "jhubbard"
67
67
|keyStoreLocation|String|null|When **keyStoreAuthentication=JavaKeyStorePassword**, the **keyStoreLocation** property identifies the path to the Java keystore file that stores the column master key to be used with Always Encrypted data. Note that the path must include the keystore filename.<br/><br/>For more information, visit [Using Always Encrypted with the JDBC Driver](https://msdn.microsoft.com/library/mt591987%28v=sql.110%29.aspx?f=255&MSPPError=-2147217396).
68
68
|keyStoreSecret|String|null|When **keyStoreAuthentication=JavaKeyStorePassword**, the **keyStoreSecret** property identifies the password to use for the keystore as well as for the key. Note that for using the Java Key Store the keystore and the key password must be the same.<br/><br/>For more information, visit [Using Always Encrypted with the JDBC Driver](https://msdn.microsoft.com/library/mt591987%28v=sql.110%29.aspx?f=255&MSPPError=-2147217396).
69
69
|lastUpdateCount|boolean<br /><br /> ["true"|"false"]|true|A "true" value only returns the last update count from an SQL statement passed to the server, and it can be used on single SELECT, INSERT, or DELETE statements to ignore additional update counts caused by server triggers. Setting this property to "false" causes all update counts to be returned, including those returned by server triggers.<br /><br /> **Note:** This property only applies when it is used with the [executeUpdate](../../connect/jdbc/reference/executeupdate-method-sqlserverstatement.md) methods. All other execute methods return all results and update counts. This property only affects update counts returned by server triggers. It does not affect result sets or errors that result as part of trigger execution.|
70
-
|lockTimeout|int|-1|The number of milliseconds to wait before the database reports a lock time-out. The default behavior is to wait indefinitely. If it is specified, this value is the default for all statements on the connection. Note that `Statement.setQueryTimeout()` can be used to set the time-out for specific statements. The value can be 0, which specifies no wait.|
70
+
|lockTimeout|int|-1|The number of milliseconds to wait before the database reports a lock time-out. The default behavior is to wait indefinitely. If it is specified, this value is the default for all statements on the connection. Note that **Statement.setQueryTimeout()** can be used to set the time-out for specific statements. The value can be 0, which specifies no wait.|
71
71
|loginTimeout|int [0..65535]|15|The number of seconds the driver should wait before timing out a failed connection. A zero value indicates that the timeout is the default system timeout, which is specified as 15 seconds by default. A non-zero value is the number of seconds the driver should wait before timing out a failed connection.<br /><br /> If you specify a Virtual Network Name in the **Server** connection property, you should specify a timeout value of three minutes or more to allow sufficient time for a failover connection to succeed. See [JDBC Driver Support for High Availability, Disaster Recovery](../../connect/jdbc/jdbc-driver-support-for-high-availability-disaster-recovery.md) for more information.|
72
72
|multiSubnetFailover|Boolean|false|Always specify **multiSubnetFailover=true** when connecting to the availability group listener of a [!INCLUDE[ssSQL11](../../includes/sssql11_md.md)] availability group or a [!INCLUDE[ssSQL11](../../includes/sssql11_md.md)] Failover Cluster Instance. **multiSubnetFailover=true** configures [!INCLUDE[jdbcNoVersion](../../includes/jdbcnoversion_md.md)] to provide faster detection of and connection to the (currently) active server. Possible values are true and false. See [JDBC Driver Support for High Availability, Disaster Recovery](../../connect/jdbc/jdbc-driver-support-for-high-availability-disaster-recovery.md) for more information.<br /><br /> You can programmatically access the **multiSubnetFailover** connection property with [getPropertyInfo](../../connect/jdbc/reference/getpropertyinfo-method-sqlserverdriver.md), [getMultiSubnetFailover](../../connect/jdbc/reference/getmultisubnetfailover-method-sqlserverdatasource.md), and [setMultiSubnetFailover](../../connect/jdbc/reference/setmultisubnetfailover-method-sqlserverdatasource.md).<br /><br /> **Note:** Beginning with Microsoft JDBC Driver 6.0 for SQL Server it is no longer required to set multiSubnetFailover to true when connecting to an Availability Group Listener. A new property, **transparentNetworkIPResolution**, which is enabled by default, provides the detection of and connection to the (currently) active server.|
73
73
|packetSize|int [-1| 0 | 512..32767]|8000|The network packet size used to communicate with SQL Server, specified in bytes. A value of -1 indicates using the server default packet size. A value of 0 indicates using the maximum value, which is 32767. If this property is set to a value outside the acceptable range, an exception will occur.<br /><br /> **Important:** We do not recommend using the packetSize property when the encryption is enabled (encrypt=true). Otherwise, the driver might raise a connection error. For more information, see the [setPacketSize](../../connect/jdbc/reference/setpacketsize-method-sqlserverdatasource.md) method of the [SQLServerDataSource](../../connect/jdbc/reference/sqlserverdatasource-class.md) class.|
0 commit comments