Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8493193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:56:17+00:00 2026-06-10T22:56:17+00:00

I am trying to connect SQL server 2008 r2 with my java application using

  • 0

I am trying to connect SQL server 2008 r2 with my java application using microsoft JDBC sqljdbc_4.0 driver in eclipse IDE, I goggled several time with JDBC connection between java and sql server 2008 and I have tried some of but getting same error message, So lastly am decided to put the question here with error message what am getting than, i can get know what wrong am doing?

I followed a link! link for connectivity with SQL Server and Java.

My java program:

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class Connect
{
    public static void main(String[] args) throws Exception
    {
        String userName = "Abhishek";
        String password = "abhishek-nayak";
        String url = "jdbc:sqlserver://Abhishek-VAIO\\MSSQLSERVER;databaseName=master;integratedSecurity=true";
        try
        {
            Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
            Connection conn = DriverManager.getConnection(url,userName,password);
            System.out.println("Connected");
        }
        catch(SQLException e)
        {
            e.printStackTrace();
        }
    }
}

my error message is:

Sep 06, 2012 9:09:55 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
WARNING: Failed to load the sqljdbc_auth.dll cause : no sqljdbc_auth in java.library.path
com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication. ClientConnectionId:5cb4d70b-f644-4670-b7bc-a2312b8547b4
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1667)
    at com.microsoft.sqlserver.jdbc.AuthenticationJNI.<init>(AuthenticationJNI.java:60)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:2229)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:2220)
    at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1326)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)
    at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at com.abhishek.Connect.main(Connect.java:17)
Caused by: java.lang.UnsatisfiedLinkError: no sqljdbc_auth in java.library.path
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at com.microsoft.sqlserver.jdbc.AuthenticationJNI.<clinit>(AuthenticationJNI.java:35)
    ... 12 more
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T22:56:18+00:00Added an answer on June 10, 2026 at 10:56 pm

    You’re using a JDBC driver that is dependent on a native SQL Server driver and need to add a path to the DLL it’s dependent on (sqljdbc_auth.dll) to your library path in java.

    To add this to settings of your Eclipse project (assuming you already have a SQL Server driver installed) do:

    right click the project in Project Explorer -> Properties -> Java Build Path -> select sqljdbc4.jar, so it expands -> select Native library location -> Edit… -> enter <location of SQL server driver on your machine>/sqljdbc_2.0/enu/auth/x64-> OK.

    Result should look like:

    Native library path location in Eclipse

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to connect the Sql Server 2008 R2 with java using JDBC.I
i am trying to connect with sql server 2008 using java connection string but
I am trying to connect to SQL Server 2008 server from Java here is
I've just installed SQL Server 2008 Developer edition and I'm trying to connect using
I am trying to connect to SQL Server 2008 using 'sa' username and its
I'm trying to connect to SQL Server 2008 R2 from a C++ application as
I am trying to connect to SQL Server 2008 from Excel VBA using the
I'm trying to connect to SQL Server on Ubuntu 9.04 using Ruby. I translated
I am trying to use SMO (VS 2010, SQL Server 2008) to connect to
I am trying to connect to a SQL Server 2008 database through a C#

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.