SQL SERVER – Fix : Error – sqljdbc_auth.dll Issue – com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1433 has failed

It seems that Sundays are marked for strange errors. Every Sunday I come across something interesting and different to post. This time I receive error from one of JDBC driver users. He sent me a message that he is not able to connect to SQL Server and he is facing the following error while connecting to SQL Server. He has already checked firewall and TCP/IP settings and still he is facing the errors.

com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1433 has failed. Error: “Connection refused: connect. Verify the connection properties. “

I am not a Java person or do not have a lot of experience with the JDBC. I had to spend lots of time .NET so this error was new to me. I decided to get online with him using remote admin and we tried to figure out what is going on with his server. We used internet extensively to figure out the problem. After a while we end up with a Microsoft Document. This document explains how to build connection string and as a good solution to the error mentioned above.

Solution / Workaround / Resolution:

To fix above error the sqljdbc_auth.dll file has to be installed in the following location:

<installation directory>\sqljdbc_<version>\<language>\auth\

You can find the Microsoft JDBC Driver 4.0 for SQL Server from here.

If above information does not resolve your error I suggest you to use refer Microsoft Document as it it contains additional solutions.

Reference: Pinal Dave (http://blog.sqlauthority.com)

About these ads

3 thoughts on “SQL SERVER – Fix : Error – sqljdbc_auth.dll Issue – com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host localhost, port 1433 has failed

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s