如何使用连接字符串从soapUI连接到SQL DB? [英] How to connect to sql DB from soapUI using connection string?

查看:65
本文介绍了如何使用连接字符串从soapUI连接到SQL DB?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想问一个已经尝试从soapUI开源版本连接到SQL数据库的人.

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

我有一个测试步骤JDBC请求,我尝试在其中测试并连接到我的sql数据库.我使用soapUI的开源版本.我阅读了应如何设置,但仍然遇到一些问题.

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.

这是我的工作: 我安装了Java 8和jdbc驱动程序4.1版.如soapUI文档中所述,将jdbc jar文件添加到SoapUi/jre/bin文件夹中.此版本的驱动程序应可与Java 8一起使用.

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

在连接字符串中:

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

我说错了

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

我使用我的域帐户,因为在我们公司中,该政策不允许我们使用数据库用户.因此,我试图在字符串中添加IntegratedSecurity参数,该参数应允许使用以下Windows帐户登录:

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

我也收到错误消息:

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?

推荐答案

为使集成身份验证正常工作,您需要sqljdbc_auth.dll匹配库路径中的环境(32位/64位)(也将其放入bin可能会有所帮助)已经)

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)

这篇关于如何使用连接字符串从soapUI连接到SQL DB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆