title: solve error in connection between sql server 2008 r2 with java in eclipse
body: <p>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?</p>
  
  <p>I followed <a href="http://thusithamabotuwana.wordpress.com/2012/07/19/connecting-to-sql-server-from-java/" rel="nofollow">a link</a>! link for connectivity with SQL Server and Java.</p>
  
  <p>My java program:</p>
  
  <pre><code>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();
          }
      }
  }
  </code></pre>
  
  <p>my error message is:</p>
  
  <pre><code>Sep 06, 2012 9:09:55 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI &lt;clinit&gt;
  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.&lt;init&gt;(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.&lt;clinit&gt;(AuthenticationJNI.java:35)
      ... 12 more
  </code></pre>