如何使用连接字符串从 soapUI 连接到 sql 数据库?

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

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

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

我是这样做的: 我安装了 java 8 和 jdbc 驱动程序版本 4.1。将 jdbc jar 文件添加到 SoapUi/jre/bin 文件夹,如 soapUI 文档中所述。此版本的驱动程序应适用于 Java 8。

然后在 Driver 字段中我写

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 帐户登录的字符串中,如下所示:

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..

有没有人遇到过同样的问题?你能给一些建议吗?

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