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
> Although the previous example uses a username and password in the connection string, you should use integrated security as it is more secure. For more information, see the [Connecting with Integrated Authentication](#Connectingintegrated) section later in this topic.
49
49
50
50
The following connection string shows an example of how to connect to a [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] database using integrated authentication and Kerberos from an application running on any operating system supported by the [!INCLUDE[jdbcNoVersion](../../includes/jdbcnoversion_md.md)]:
[!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] allows for the installation of multiple database instances per server. Each instance is identified by a specific name. To connect to a named instance of [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)], you can either specify the port number of the named instance (preferred), or you can specify the instance name as a JDBC URL property or a **datasource** property. If no instance name or port number property is specified, a connection to the default instance is created. See the following examples:
75
75
76
76
To specify a port number, use the following format:
77
77
78
-
`jdbc:sqlserver://localhost:1433;integratedSecurity=true;<more properties as required>;`
78
+
`jdbc:sqlserver://localhost:1433;encrypt=true;integratedSecurity=true;<more properties as required>;`
79
79
80
80
To use a JDBC URL property, use the following format:
81
81
82
-
`jdbc:sqlserver://localhost;instanceName=instance1;integratedSecurity=true;<more properties as required>;`
82
+
`jdbc:sqlserver://localhost;encrypt=true;instanceName=instance1;integratedSecurity=true;<more properties as required>;`
83
83
84
84
## Escaping values in the connection URL
85
85
@@ -89,7 +89,7 @@ Before version 8.4, escaped values can contain special characters (especially '=
89
89
90
90
In version 8.4 and above, escaped values can contain special characters, including braces. However, closing braces must be escaped. For example, with a password of `pass";{}word`, a connection string would need to escape the password as follows:
Copy file name to clipboardExpand all lines: docs/connect/jdbc/release-notes-for-the-jdbc-driver.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -780,7 +780,7 @@ Microsoft JDBC Driver 6.0 for SQL Server is fully compliant with JDBC specificat
780
780
To ensure that you have the right sqljdbc42.jar or sqljdbc41.jar file, run the following lines of code. If the output is "Driver version: 6.0.7507.100", you have the JDBC Driver 6.0 package.
@@ -827,7 +827,7 @@ Microsoft JDBC Driver 4.2 for SQL Server is fully compliant with JDBC specificat
827
827
To ensure you have the right sqljdbc42.jar or sqljdbc41.jar file, run the following lines of code. If the output is "Driver version: 4.2.6420.100", you have the JDBC Driver 4.2 package.
0 commit comments