Pentaho数据集成:与MS SQL Server的jdbc连接不工作

Pentaho数据集成:与MS SQL Server的jdbc连接不工作,jdbc,pentaho,kettle,mssql-jdbc,Jdbc,Pentaho,Kettle,Mssql Jdbc,有了Pentaho数据集成社区版-Kettle 5.0.1,我可以毫无问题地连接到我的MS SQL Server 2014数据库,选择MS SQL Serever,然后选择tools-中的本机JDBC?向导->创建数据库连接 我现在已升级到最新的5.4版本,无法再连接 我得到的错误如下 有没有关于如何解决这个问题的建议?我感到困惑的是,我找不到一种方法告诉Pentaho jdbc驱动程序在哪里。例如,我下载了微软的JDBC驱动程序,但如何让Pentaho使用它们呢?我将文件sqljdbc42.j

有了Pentaho数据集成社区版-Kettle 5.0.1,我可以毫无问题地连接到我的MS SQL Server 2014数据库,选择MS SQL Serever,然后选择tools-中的本机JDBC?向导->创建数据库连接

我现在已升级到最新的5.4版本,无法再连接

我得到的错误如下

有没有关于如何解决这个问题的建议?我感到困惑的是,我找不到一种方法告诉Pentaho jdbc驱动程序在哪里。例如,我下载了微软的JDBC驱动程序,但如何让Pentaho使用它们呢?我将文件sqljdbc42.jar复制到c:\Pentaho\lib,但没有成功。我还尝试在“通用数据库”选项中使用它,但同样没有用

Error connecting to database [c] : org.pentaho.di.core.exception.KettleDatabaseException: 
Error occurred while trying to connect to the database

Error connecting to database: (using class net.sourceforge.jtds.jdbc.Driver)
I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property.


org.pentaho.di.core.exception.KettleDatabaseException: 
Error occurred while trying to connect to the database

Error connecting to database: (using class net.sourceforge.jtds.jdbc.Driver)
I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property.


    at org.pentaho.di.core.database.Database.normalConnect(Database.java:428)
    at org.pentaho.di.core.database.Database.connect(Database.java:358)
    at org.pentaho.di.core.database.Database.connect(Database.java:311)
    at org.pentaho.di.core.database.Database.connect(Database.java:301)
    at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:80)
    at org.pentaho.di.core.database.DatabaseMeta.testConnection(DatabaseMeta.java:2686)
    at org.pentaho.di.ui.core.database.dialog.DatabaseDialog.test(DatabaseDialog.java:109)
    at org.pentaho.di.ui.core.database.wizard.CreateDatabaseWizardPage2.test(CreateDatabaseWizardPage2.java:157)
    at org.pentaho.di.ui.core.database.wizard.CreateDatabaseWizardPage2$3.widgetSelected(CreateDatabaseWizardPage2.java:147)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
    at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:820)
    at org.eclipse.jface.window.Window.open(Window.java:796)
    at org.pentaho.di.ui.core.database.wizard.CreateDatabaseWizard.createAndRunDatabaseWizard(CreateDatabaseWizard.java:111)
    at org.pentaho.di.ui.spoon.Spoon.createDatabaseWizard(Spoon.java:7595)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.pentaho.ui.xul.impl.AbstractXulDomContainer.invoke(AbstractXulDomContainer.java:313)
    at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:157)
    at org.pentaho.ui.xul.impl.AbstractXulComponent.invoke(AbstractXulComponent.java:141)
    at org.pentaho.ui.xul.jface.tags.JfaceMenuitem.access$100(JfaceMenuitem.java:43)
    at org.pentaho.ui.xul.jface.tags.JfaceMenuitem$1.run(JfaceMenuitem.java:106)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:545)
    at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
    at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
    at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Unknown Source)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
    at org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:1319)
    at org.pentaho.di.ui.spoon.Spoon.waitForDispose(Spoon.java:7939)
    at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:9190)
    at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:654)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.pentaho.commons.launcher.Launcher.main(Launcher.java:92)
Caused by: org.pentaho.di.core.exception.KettleDatabaseException: 
Error connecting to database: (using class net.sourceforge.jtds.jdbc.Driver)
I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property.

    at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:592)
    at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:4697)
    at org.pentaho.di.core.database.Database.normalConnect(Database.java:414)
    ... 43 more
Caused by: java.sql.SQLException: I/O Error: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property.
    at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:615)
    at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:345)
    at net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java:50)
    at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:578)
    ... 45 more
Caused by: java.io.IOException: SSO Failed: Native SSPI library not loaded. Check the java.library.path system property.
    at net.sourceforge.jtds.jdbc.TdsCore.sendMSLoginPkt(TdsCore.java:1893)
    at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:588)

我通过将ntlmauth.dll文件从旧Pentaho安装复制到c:\Pentaho\libswt\win32修复了这个问题

我从这篇文章中得到了一个提示:

总之,此dll与集成身份验证有关,即使用Windows ID登录SQL server,而不是显式地告诉驱动程序您的ID和密码

我真的不明白为什么旧的安装有这个文件,而新的没有,但这是可行的

其他替代方案可能是从微软的官方jdbc驱动程序中获取相同的文件,尽管我不确定该dll是否只适用于微软的jdbc或Pentaho,或者从JTDS包中获取相同的文件。我在C:\Pentaho\pdi-ce-7.0.0.0-25\data integration\lib中解决了驱动程序sqljdbc.jar。并复制文件sqljdbc_auth.dll以允许另一种类型的自动验证


最后,在连接类型中,我选择了MS SQL Server Native。

我使用JTDS没有任何问题。当我开始使用5.4时,我也遇到了类似的问题。不确定这是否是原因,但我知道PDI已经放弃了对SQL Server作为DB存储库主机的官方支持。我知道我做不到。幸好Postgres是免费的。你有到变更日志的链接吗?我很想知道为什么。我找不到它。这很奇怪,因为PDI 5.4仍然让我可以选择连接SQL Server,但仍然有与SQL Server一起工作的JDBC驱动程序-显然,只有集成身份验证才是我遇到的问题。PS这种未记录或记录不充分的更改,特别是那些破坏向后兼容性的更改,是开源和免费软件的主要问题之一,这阻碍了它们在商业环境中的应用,在商业环境中,时间就是金钱,你昨天需要一个答案……恐怕我没有在变更日志中看到它。它只是在某个地方的一个网站上,所以不要把它当作福音。然而,我确实尝试在SQL Server上建立一个回购协议,但由于SQL方言问题而失败。我总是在集成身份验证方面遇到问题。你必须把DLL放在正确的地方。当我发现如何使用JTD时,我转而使用它。