简体   繁体   English

集成身份验证错误 Microsoft SQL Server 2017 和 Knime

[英]Integration Authentication Error Microsoft SQL Server 2017 and Knime

There are a number of older posts on integrating a database with Knime, however I haven't found any discussions regarding the latest versions of Java, Knime, and SQL.有许多关于将数据库与 Knime 集成的旧帖子,但是我没有找到任何关于最新版本的 Java、Knime 和 SQL 的讨论。 I have spent days looking at forums here and on StackOverflow and elsewhere trying to connect to a database with Knime, however nothing has worked.我花了几天时间在这里和 StackOverflow 和其他地方查看论坛,试图用 Knime 连接到数据库,但没有任何效果。

My computer configuration is as follows: 64 bit Operating System Microsoft SQL Server 2017 (64 bit version) Microsoft SQL Server Management Studio 17 Microsoft JDBC Driver 7.0 for SQL Server KNIME 3.7.0 (64 bit version) Java jre1.8.0_191我的电脑配置如下: 64 位操作系统 Microsoft SQL Server 2017(64 位版本) Microsoft SQL Server Management Studio 17 Microsoft JDBC Driver 7.0 for SQL Server KNIME 3.7.0(64 位版本) Java jre1.8.0_191

So far I've tried: Downloading java versions into both Program Files\\Java and Program Files (x86)\\Java.到目前为止,我已经尝试过:将 Java 版本下载到 Program Files\\Java 和 Program Files (x86)\\Java。 Currently I have the java version that is stored in the Program Files directory and not in the (x86) directory.目前,我的 java 版本存储在 Program Files 目录中,而不是 (x86) 目录中。

Downloading and unzipping the 'sqljdbc_7.0.0.0_enu' JDBC 7.0 Driver.下载并解压 'sqljdbc_7.0.0.0_enu' JDBC 7.0 驱动程序。 I also tried the JDBC 6.0 Driver, but that didn't work.我还尝试了 JDBC 6.0 驱动程序,但是没有用。

putting sqljdbc_auth.dll in the C\\Program Files\\Java\\jre1.8.0_191\\bin and C\\Program Files\\Java\\jre1.8.0_191\\lib directories.将 sqljdbc_auth.dll 放在 C\\Program Files\\Java\\jre1.8.0_191\\bin 和 C\\Program Files\\Java\\jre1.8.0_191\\lib 目录中。

Enabling TCP/IP Port in Microsoft SQL Server Management Studio在 Microsoft SQL Server Management Studio 中启用 TCP/IP 端口

configuring Knime's Database Connector, Database Reader, and Microsoft SQL Server Connector nodes to the following settings: Database driver: com.microsoft.sqlserver.jdbc.SQLServerDriver Database URL: jdbc:sqlserver://(localhost);将 Knime 的数据库连接器、数据库读取器和 Microsoft SQL Server 连接器节点配置为以下设置: 数据库驱动程序:com.microsoft.sqlserver.jdbc.SQLServerDriver 数据库 URL:jdbc:sqlserver://(localhost); integratedSecurity=true;集成安全=真; Authentication: Checked 'Use credentials' (for Database Reader this feature is blocked out)身份验证:选中“使用凭据”(对于数据库阅读器,此功能被阻止)

When I execute the Database Connector node I get the following error: ERROR Database Connector 0:2 Execute failed: Could not create connection to database: no sqljdbc_auth in java.library.path当我执行数据库连接器节点时,我收到以下错误:错误数据库连接器 0:2 执行失败:无法创建到数据库的连接:java.library.path 中没有 sqljdbc_auth

When I execute the Database Reader node I get the following error: ERROR Database Reader 0:1 Execute failed: This driver is not configured for integrated authentication.当我执行数据库读取器节点时,我收到以下错误:错误数据库读取器 0:1 执行失败:此驱动程序未配置为集成身份验证。 ClientConnectionId:4906d2f3-e3df-4016-a383-29840cb4dee2 ClientConnectionId:4906d2f3-e3df-4016-a383-29840cb4dee2

When I execute the Microsoft SQL Server Connector I get the following error: ERROR Microsoft SQL Server Connector 0:5 Execute failed: Could not create connection to database: no sqljdbc_auth in java.library.path当我执行 Microsoft SQL Server 连接器时,我收到以下错误:错误 Microsoft SQL Server 连接器 0:5 执行失败:无法创建到数据库的连接:java.library.path 中没有 sqljdbc_auth

It seems an extra setup step is required for the integrated authentication setup.集成身份验证设置似乎需要额外的设置步骤。 I assume you are using KNIME with 64 bit JVM, so you should copy the C:\\Microsoft JDBC Driver 6.4 for SQL Server\\sqljdbc_<version>\\enu\\auth\\x64\\sqljdbc_auth.dll to the C:\\Windows\\System32 folder or add the following line to knime.ini (somewhere after the -vmargs line):我假设您使用的是带有 64 位 JVM 的 KNIME,因此您应该将C:\\Microsoft JDBC Driver 6.4 for SQL Server\\sqljdbc_<version>\\enu\\auth\\x64\\sqljdbc_auth.dll复制到C:\\Windows\\System32文件夹或将以下行添加到 knime.ini(在-vmargs行之后的某处):

-Djava.library.path=C:\Microsoft JDBC Driver 6.4 for SQL Server\sqljdbc_<version>\enu\auth\x64

(I assume <version> should be something fitting your JDBC driver set for KNIME. The path probably also requires further adjustments.) (我认为<version>应该适合您为 KNIME 设置的 JDBC 驱动程序。该路径可能还需要进一步调整。)

I think the second option is preferred, so you can have different JDBC drivers, but it requires adjustments to knime.ini for all installation.我认为第二个选项是首选,因此您可以使用不同的 JDBC 驱动程序,但它需要为所有安装调整 knime.ini。

Microsoft's JDBC driver seems to prefer that sqljdbc_auth.dll be visible on the Windows PATH to make it available for trusted connections (Windows authentication) to a SQL Server instance. Microsoft 的 JDBC 驱动程序似乎更喜欢 sqljdbc_auth.dll 在 Windows PATH上可见,以使其可用于到 SQL Server 实例的可信连接(Windows 身份验证)。 Ensure that the DLL is in a folder on the PATH.确保 DLL 位于 PATH 上的文件夹中。

After many trial and error, here is how I resolve my issue of KNIME JDBC connection to MS SQLExpress with Windows authentication.经过多次反复试验,这里是我如何解决我的 KNIME JDBC 连接到使用 Windows 身份验证的 MS SQLExpress 的问题。 I using the jTDS for Microsoft SQL Server that comes with KNIME.我使用 KNIME 附带的用于 Microsoft SQL Server 的 jTDS。

Select the Microsoft SQL Server Connector Node and configure the node with the following settings:选择 Microsoft SQL Server 连接器节点并使用以下设置配置节点:

  • a) Hostname = localhost (if running remote, replace with hostname or IP of remote server) a) Hostname = localhost(如果远程运行,替换为远程服务器的主机名或IP)

  • b) Port = 1433 (default SQLserver port) b) 端口 = 1433(默认 SQLserver 端口)

  • c) Database Name = PracticeDB (replace with your database name you wish to connect) c) 数据库名称 = PracticeDB(替换为您希望连接的数据库名称)

  • d) Authentication: None/native authentication d) 认证:无/本地认证

  • In the JDBC Parameters tab from the Microsoft SQL Server Connector, add the following: integratedSecurity for Name and the boolean value of true在 Microsoft SQL Server 连接器的 JDBC 参数选项卡中,添加以下内容: IntegratedSecurity for Name和布尔值true

KNIME Microsoft SQL Server Connector will generate the necessary JDBC connection string: KNIME Microsoft SQL Server 连接器将生成必要的 JDBC 连接字符串:

Database type: Microsoft SQL Server Connection: URL="jdbc:jtds:sqlserver://localhost:1433/PracticeDB" Driver: jTDS for Microsoft SQL Server (ID=jTDS for Microsoft SQL Server, Version=1.3.0)数据库类型:Microsoft SQL Server 连接: URL="jdbc:jtds:sqlserver://localhost:1433/PracticeDB" 驱动程序:Microsoft SQL Server 的 jTDS(Microsoft SQL Server 的 ID=jTDS,版本=1.3.0)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Microsoft SQL Server 2017上执行长SQL脚本 - Executing a long SQL script on Microsoft SQL Server 2017 Spring集成-Microsoft SQL Server 2012的消息存储配置 - Spring Integration - Message Store configuration for Microsoft SQL Server 2012 SQL Server的休眠身份验证错误 - Hibernate Authentication Error with SQL Server 连接到Microsoft SQL Server时出错 - Error while connecting to Microsoft SQL Server 带有 Microsoft 错误的 Firebase 身份验证 - Firebase authentication with Microsoft error Android 中的 Microsoft ISA 服务器身份验证 - Microsoft ISA Server Authentication in Android Java Rest 集成认证错误 - Java Rest Integration Authentication error Microsoft SQL Server:“登录失败。 该登录名来自不受信任的域,不能与Windows身份验证一起使用。” - Microsoft SQL Server: “Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.” 通过JDBC连接到IBM IIB中的Microsoft SQL Server时出错 - Error connecting to Microsoft SQL Server in IBM IIB via JDBC SQL 服务器 2019 JKS 文件上的外部脚本执行验证错误 - SQL Server 2019 External Script Execution Authentication Error on JKS File
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM