Skip to content

Latest commit

 

History

History
41 lines (32 loc) · 3.44 KB

connecting-to-sql-server-with-the-jdbc-driver.md

File metadata and controls

41 lines (32 loc) · 3.44 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic
Connecting to SQL Server with the JDBC driver
When connecting to the database using the Microsoft JDBC Driver for SQL Server, all interaction with the database goes through the SQLServerConnection object.
David-Engel
davidengel
08/12/2019
sql
connectivity
conceptual

Connecting to SQL Server with the JDBC driver

[!INCLUDEDriver_JDBC_Download]

One of the most fundamental things that you'll do with the [!INCLUDEjdbcNoVersion] is to make a connection to a [!INCLUDEssNoVersion] 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 [!INCLUDEssNoVersion] 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 [!INCLUDEssNoVersion]:

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

The articles in this section describe how to make and work with a connection to a [!INCLUDEssNoVersion] database.

In this section

Article Description
Building the connection URL Describes how to form a connection URL for connecting to a [!INCLUDEssNoVersion] database. Also describes connecting to named instances of a [!INCLUDEssNoVersion] database.
Setting the connection properties Describes the various connection properties and how they can be used when you connect to a [!INCLUDEssNoVersion] database.
Setting the data source Properties Describes how to use data sources in a Java Platform, Enterprise Edition (Java EE) environment.
Working with a connection Describes the various ways in which to create an instance of a connection to a [!INCLUDEssNoVersion] database.
Using connection pooling Describes 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 recovery Describes how to develop an application that will connect to an Always On availability group.
Using Kerberos Integrated Authentication to Connect to SQL Server Discusses a Java implementation for applications to connect to a [!INCLUDEssNoVersion] database using Kerberos integrated authentication.
Connecting to an Azure SQL database Discusses connectivity issues for databases on Azure SQL.

See also

Overview of the JDBC driver