【问题标题】:How to connect to sql DB from soapUI using connection string?如何使用连接字符串从soapUI连接到sql DB?
【发布时间】:2015-11-06 14:21:04
【问题描述】:

我想问一下已经尝试从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..

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

【问题讨论】:

    标签: sql-server jdbc soapui


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 2021-09-02
      • 1970-01-01
      • 2023-03-28
      • 1970-01-01
      • 1970-01-01
      • 2010-11-14
      • 2011-06-15
      • 2013-07-21
      相关资源
      最近更新 更多