TechNet
Export (0) Print
Expand All

Connecting to SQL Server with the JDBC Driver

 

DownloadDownload JDBC Driver

One of the most fundamental things that you will do with the Microsoft JDBC Driver for SQL Server is to make a connection to a SQL Server database. All interaction with the database occurs through the SQLServerConnection object, and because the JDBC driver has such a flat architecture, almost all interesting behavior touches the SQLServerConnection object.

If a SQL Server is only listening on an IPv6 port, set the java.net.preferIPv6Addresses system property to make sure that IPv6 is used instead of IPv4 to connect to the SQL Server:

System.setProperty("java.net.preferIPv6Addresses", "true");  

The topics in this section describe how to make and work with a connection to a SQL Server database.

TopicDescription
Building the Connection URLDescribes how to form a connection URL for connecting to a SQL Server database. Also describes connecting to named instances of a SQL Server database.
Setting the Connection PropertiesDescribes the various connection properties and how they can be used when you connect to a SQL Server database.
Setting the Data Source PropertiesDescribes how to use data sources in a Java Platform, Enterprise Edition (Java EE) environment.
Working with a ConnectionDescribes the various ways in which to create an instance of a connection to a SQL Server database.
Using Connection PoolingDescribes how the JDBC driver supports the use of connection pooling.
Using Database Mirroring (JDBC)Describes how the JDBC driver supports the use of database mirroring.
JDBC Driver Support for High Availability, Disaster RecoveryDescribes how to develop an application that will connect to an AlwaysOn availability group.
Using Kerberos Integrated Authentication to Connect to SQL ServerDiscusses a Java implementation for applications to connect to a SQL Server database using Kerberos integrated authentication.
Connecting to an Azure SQL databaseDiscusses connectivity issues for databases on SQL Azure.

Overview of the JDBC Driver

Community Additions

ADD
Show:
© 2016 Microsoft