How to connect to sql DB from soapUI using connection string?

淺唱寂寞╮ 提交于 2019-12-12 02:45:48

问题


I would like to ask someone who already tried to connect to SQL database from soapUI opensource version.

I have a test step JDBC request where I try to test and connect to my sql database. I use opensource version of soapUI. I read how it should be set up but still experience some problems.

This is what I do: I installed java 8 and jdbc driver version 4.1. Added jdbc jar file to SoapUi/jre/bin folder as it is said in documentation for soapUI. This version of driver should work with Java 8.

Then in Driver field I write

com.microsoft.sqlserver.jdbc.SQLServerDriver

In connection string:

jdbc:sqlserver://Sservername:portnumber;databaseName=Consumption;username=alyona.kovalyova;password=mypassword

I get error saying

Can't get the Connection for specified properties; com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'alyona.kovalyova'. ClientConnectionId...

I use my domain account because in our company the policy does not allow us to use database user. Because of this I tried to add integratedSecurity parameter to the string which should allow to login with windows account like this:

jdbc:sqlserver://S23-AS:1433;databaseName=Consumption;integratedSecurity=true

I also get error:

Can't get the Connection for specified properties; com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication. ClientConnectionId..

Does anyone encountered the same issue before? Could you give some recommendation?


回答1:


For integrated authentication to work you'll need sqljdbc_auth.dll matching your environment (32bit / 64bit) in your library path (putting it in bin as well might help already)



来源:https://stackoverflow.com/questions/33568902/how-to-connect-to-sql-db-from-soapui-using-connection-string

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!