Forum Discussion

MegNa_12_56's avatar
MegNa_12_56
New Contributor
4 years ago

Not able to connect to the sql server database through JDBC request, getting error while connecting

Not able to connect to the sql server database through JDBC request, getting error while connecting

 

getting below error 

 

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

 

I have copied both sqljdbc42.jar and mssql-jdbc_auth-9.4.0.x64.dll on both 

 

C:\Program Files\SmartBear\ReadyAPI-3.10.0\bin\ext

C:\Program Files\SmartBear\ReadyAPI-3.10.0\bin

 

and here is the configuration 

 

com.microsoft.sqlserver.jdbc.SQLServerDriver

jdbc:sqlserver://Server;databaseName=Test;integratedSecurity=true;user=username;password=PASS_VALUE

  • richie's avatar
    richie
    Community Hero

    Hey MegNa_12_56 

     

    I always find connecting SQLServer fiddly myself - especially windows auth or mixed mode

     

    have you confirmed the following?

     

    correct version of jdbc drivers for the version of SQLServer you are trying to connect to?

    correct version of Java to support the version of jdbc drivers you are using?

    are you using x86 (32bit) or 64bit - you need to ensure you have the correct version of Java installed (so if processor architecture is 64bit, then you need 64bit Java)

     

    Cheers,

     

    Rich

  • I had a similar issue.

    They are referring to the wrong version of the .dll in the docs. At least for my needs. I did the following:

    1. Download mssql-jdbc_auth-9.2.1 (note the version)

    2. Place this .dll in ReadyAPI's bin directory

     

    If you have ReadyAPI open while doing this the changes will not take affect until the next time you launch the application

    Your connection string should look something like this: 

    jdbc:sqlserver://<HOST>:<PORT>;databaseName=<DB>;integratedSecurity=true

     

    • MegNa_12_56's avatar
      MegNa_12_56
      New Contributor

       I tried as you said I have downloaded mssql-jdbc_auth-9.2.1 and placed in both bin folder and \bin\ext folder and closed the ready api and relaunched 

      still getting the same error 

       

      My Java version is  "1.8.0_301"

       

      com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication. ClientConnectionId:4a709517-eff9-44e6-a76e-d187460b45aa