Cant get JDBC connection to microsoft sqlserver to work
Hello,
I'm having issues getting a jdbc connection to work. I've tried several things regarding to other topics but no success so far.
So, I'm using ReadyApi 2.2
bin\ext folder contains sqljdbc42.jar
bin folder contains sqljdbc_auth.dll
Logs at startup:
INFO:Adding [D:\ReadyAPI-2.2.0\bin\ext\sqljdbc42.jar] to extensions classpath
connection string template:
jdbc:sqlserver://<HOST:127.0.0.1>:<PORT:1433>;databaseName=<DB>;user=<USER>;password=<PASSWORD>
So, when testing the connection I receive the following error message:
com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'xxx'. ClientConnectionId:4f556d5b-b629-4fde-b1e2-aff498d076ca
The logs state:
The JDBC driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] is already registered.
I'm not using windows authentication:
JDBC:SQLSERVER://serverxxx:1433;databaseName=dbo.xxx;user=xxx;password=PASS_VALUE
where my password is entered in the next field Password.
Before upgrading to 2.2 the error message was: java.sql.SQLException: Incorrect URL:
I can login with the specified credentials on the SQL server.
Any suggestions?
Thanks, Lars
- Alternative library available if you want to try.
Download jtds-1.3.1.jar
And place it under READYAPI_HOME/bin/ext directory and restart.
Use driver class as : net.sourceforge.jtds.jdbc.Driver
Use connection string as :
jdbc:jtds:sqlserver://${dbServer}:${port}/${dbName};domain=${domain}
NOTE: replace the above place holder values.