com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.

com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.

Rate This
  • Comments 38

On a Windows platform, when trying to connect to SQL Server using Integrated Authentication, you may see this exception:
    com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication.
along with the following trace message:
    com.microsoft.sqlserver.jdbc.AuthenticationJNI <clinit>
    WARNING: Failed to load the sqljdbc_auth.dll

This generally indicates that the driver can not find the appropriate sqljdbc_auth.dll in the JVM library path.  To correct the problem, please use the java.exe -D option to specify the "java.library.path" system property value.  You will want to specify the full path to the directory contain the sqljdbc_auth.dll.
    For example:  java -cp .;"c:\jdbcv1_2\sqljdbc.jar" -Djava.library.path="c:\jdbcv1_2\auth\x86" myApp

Alternatively, you can copy the sqljdbc_auth.dll to a directory in the search path (example: the local directory where you are executing your application).

Note: You may also get the same error message if the application is trying to use the incorrect architecture (x86 VS x64) version of the sqljdbc_auth.dll.  Try specifying the directory path to the other architecture.
If you are on a x64 machine running x64 OS, but the JVM you are using is the x86 version, you will need to specify and use the x86 version of the sqljdbc_auth.dll.

Some related information:
If you get the following exception:
  java.lang.UnsatisfiedLinkError: GetDNSName
This typically indicates that the application is trying to use the incorrect version (say v1.0 VS v1.1) of the sqljdbc_auth.dll.  Make sure the application is using the save version of the sqljdbc.jar and sqljdbc_auth.dll files.

Jimmy Wu, SQL Server
Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights

Leave a Comment
  • Please add 5 and 4 and type the answer here:
  • Post
  • I am trying to connect to SQL server 2008 from within Eclipse. However, I keep getting the message "failed to load sqljdbc_auth.dll. I have this file set in the system Path, eclipse path. The file has been copied to multiple system and application folders, but to no good. Can somebody suggest me steps one by one to configure Eclipse to log on to SQL server 2008?

    Thanks

    Raghu

  • I Microsoft SQL Server JDBC Driver 3.0 on a client machine running WIn7 64bit and I am using Window Server 2008. I am using NT authentication.  Sometimes I get connected to the database with no problem other times I get the following intermittent error:

    com.microsoft.sqlserver.jdbc.SQLServerConnection SSPIData

    WARNING: ConnectionID:46 Authentication failed code-2146892976

    with the message "This driver is not configured for integrated authentication"

    Inevitably I reboot the client machine or restart the client application, which seems to increase the odds of a connection being established.

    jdbc:sqlserver://<my sql server IP address>;database=qai;integratedSecurity=true;

    Not sure why?

    Is this just related to a time-out or a path issue? does anyone have any ideas?

    Should I force the login timeout to be longer?

  • I Microsoft SQL Server JDBC Driver 3.0 on a client machine running WIn7 64bit and I am using Window Server 2008. I am using NT authentication.  Sometimes I get connected to the database with no problem other times I get the following intermittent error:

    com.microsoft.sqlserver.jdbc.SQLServerConnection SSPIData

    WARNING: ConnectionID:46 Authentication failed code-2146892976

    with the message "This driver is not configured for integrated authentication"

    Inevitably I reboot the client machine or restart the client application, which seems to increase the odds of a connection being established.

    jdbc:sqlserver://<my sql server IP address>;database=qai;integratedSecurity=true;

    Not sure why?

    Is this just related to a time-out or a path issue? does anyone have any ideas?

    Should I force the login timeout to be longer?

  • Señores:

    Yo trabajé con la herramienta Rational Functional Tester V.7 en base a el IDE Eclipse y realice la conexión con el MS SQL Server 2008 R2, antes que todo descargue el archivo indicado en todos los blog de MS, para la versión MS SQL Server 2008 R2  conector JDBC. 3.0 de todas formas siempre puedes usar el sqljdbc.jar, donde encontraras la .dll necesaria nombrada "sqljdbc_auth.dll", recuerda chequear la versión para tu procesador, X86(32 Bits),  64 Bits y otra extra que aparece.

    La mejor opción es copiar el archivo .dll

    Solución:

    C:\Window\

    y listo, estará todo Ok.

    Puedes realizar la prueba ahora, el String de conexión que use fue este:

    String url = "jdbc:sqlserver://localhost;databaseName=Mydatabase;integratedSecurity=true;";

    locahost = nombre del servidor.

    databaseName= nombre de tu base de datos.

    integratedSecurity=true; indica que ingresara con la "Autenticación Window".

    Que Dios los bendiga.

    Cristóbal Ramón Herrera Jara

    "Write once, run anywhere"

  • I ran my Java program using the below statement. It worked fine for me.

    java -cp .;"C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\enu\sqljdbc4.jar" -Djava.library.path="C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\enu\auth\x86" DBCon

    Thanks

    ---------------------------------

    Santhosh B

  • Hello,

    Thank you so much for the instructions. I've been trying for days connect to database and finally did it!

    Regards

  • Thanks, that was very useful!

    I was just about to give up trying to connect via jdbc to SQL Server Express 2012 when I found your page, now I can proceed testing it.

  • please help me

    i get the following error

    but it was working before 2 days

    Oct 23, 2014 3:39:23 PM com.microsoft.sqlserver.jdbc.AuthenticationJNI GenerateClientContext

    WARNING: com.microsoft.sqlserver.jdbc.AuthenticationJNI@3e96cf Authentication failed code : -2146893052

    com.microsoft.sqlserver.jdbc.SQLServerException: Integrated authentication failed. ClientConnectionId:3cc62292-e44e-4902-9a7a-27efddec5d16

    Oct 23, 2014 3:39:23 PM org.apache.catalina.core.StandardWrapperValve invoke

    SEVERE: Servlet.service() for servlet jsp threw exception

Page 3 of 3 (38 items) 123