Skip to content

Latest commit

 

History

History
40 lines (26 loc) · 4.86 KB

troubleshooting-connectivity.md

File metadata and controls

40 lines (26 loc) · 4.86 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic
Troubleshooting connectivity
Learn about JDBC connectivity and how to troubleshoot potential connection issues when using the Microsoft JDBC Driver for SQL Server.
David-Engel
davidengel
08/12/2019
sql
connectivity
conceptual

Troubleshooting connectivity

[!INCLUDEDriver_JDBC_Download]

The [!INCLUDEjdbcNoVersion] requires that TCP/IP be installed and running to communicate with your [!INCLUDEssNoVersion] database. You can use the [!INCLUDEssNoVersion] Configuration Manager to verify which network library protocols are installed.

A database connection attempt might fail for many reasons. These can include the following:

  • TCP/IP is not enabled for [!INCLUDEssNoVersion], or the server or port number specified is incorrect. Verify that [!INCLUDEssNoVersion] is listening with TCP/IP on the specified server and port. This might be reported with an exception similar to: "The login has failed. The TCP/IP connection to the host has failed." This indicates one of the following:

    • [!INCLUDEssNoVersion] is installed but TCP/IP has not been installed as a network protocol for [!INCLUDEssNoVersion] by using the [!INCLUDEssNoVersion] Network Utility for [!INCLUDEssVersion2000], or the [!INCLUDEssNoVersion] Configuration Manager for [!INCLUDEssVersion2005] and later.

    • TCP/IP is installed as a [!INCLUDEssNoVersion] protocol, but it is not listening on the port specified in the JDBC connection URL. The default port is 1433, but [!INCLUDEssNoVersion] can be configured at product installation to listen on any port. Make sure that [!INCLUDEssNoVersion] is listening on port 1433. Or, if the port has been changed, make sure that the port specified in the JDBC connection URL matches the changed port. For more information about JDBC connection URLs, see Building the connection URL.

    • The address of the computer that is specified in the JDBC connection URL does not refer to a server where [!INCLUDEssNoVersion] is installed and started.

    • The networking operation of TCP/IP between the client and server running [!INCLUDEssNoVersion] is not operable. You can check TCP/IP connectivity to [!INCLUDEssNoVersion] by using telnet. For example, at the command prompt, type telnet 192.168.0.0 1433 where 192.168.0.0 is the address of the computer that is running [!INCLUDEssNoVersion] and 1433 is the port it is listening on. If you receive a message that states "Telnet cannot connect," TCP/IP is not listening on that port for [!INCLUDEssNoVersion] connections. Use the [!INCLUDEssNoVersion] Network Utility for [!INCLUDEssVersion2000], or the [!INCLUDEssNoVersion] Configuration Manager for [!INCLUDEssVersion2005] and later to make sure that [!INCLUDEssNoVersion] is configured to use TCP/IP on port 1433.

    • The port that is used by the server has not been opened in the firewall. This includes the port that is used by the server or optionally, the port associated with a named instance of the server.

  • The specified database name is incorrect. Make sure that you are logging on to an existing [!INCLUDEssNoVersion] database.

  • The user name or password is incorrect. Make sure that you have the correct values.

  • When you use [!INCLUDEssNoVersion] Authentication, the JDBC driver requires that [!INCLUDEssNoVersion] is installed with [!INCLUDEssNoVersion] Authentication, which is not the default. Make sure that this option is included when you install or configure your instance of [!INCLUDEssNoVersion].

See also

Diagnosing problems with the JDBC driver
Connecting to SQL Server with the JDBC driver