Pentaho Kettle:无法连接到 MS SQL Server Express
Pentaho Kettle: cannot connect to MS SQL Server Express
我的本地计算机上有 Microsoft SQL Server 2014 Express 运行,Windows 7 PC。
我使用 Python 并且可以毫无问题地连接到服务器(从同一台 PC),使用 SQL alchemy。我还可以使用 Excel 和 PowerPivot 加载项进行连接。
但是,我无法连接 Pentaho - Kettle。
- 我已经从 Microsoft 下载了 JDBC 驱动程序:
https://www.microsoft.com/en-gb/download/details.aspx?id=11774
- 我把文件jre8\sqljdbc42.jar 移到了
Pentaho 数据集成安装。我取的文件是jre8,不是jre7,因为我的Java是JRE1.8.0_144
- 然后我将
auth\x86\sqljdbc_auth.dll
中的文件复制到同一个lib文件夹中。我拿了 x86 文件,而不是 x64,因为 Java 在 c:\Program Files (x86)\Java\jre1.8.0_144\
中
- 我添加 'table input' 并设置连接类型 = MS SQL 服务器(本机)和访问 = 本机 (JDBC)
我收到的错误信息是:
Error connecting to database [mydatabase] :org.pentaho.di.core.exception.KettleDatabaseException: Error occurred while trying to connect to the database
Error connecting to database: (using class com.microsoft.sqlserver.jdbc.SQLServerDriver) The TCP/IP connection to the host localhost, port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
org.pentaho.di.core.exception.KettleDatabaseException: Error occurred while trying to connect to the database
Error connecting to database: (using class com.microsoft.sqlserver.jdbc.SQLServerDriver) The TCP/IP connection to the host localhost, port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
我尝试了各种组合,包括指定端口号 1433 并将其留空、使用集成安全性和手动输入密码、将主机名设置为 localhost 和 DESKTOP-MYNAME\SQLEXPRESS,但无济于事.
我已经阅读了很多关于它的讨论,但 none 似乎相关; SQL 服务器确实接受传入连接,例如来自 Python 和 SQL 炼金术。
我运行 SQL Server 2014 配置管理器,并检查:
SQL 服务器网络配置 --> SQLEXPRESS 的协议 --> TCP/IP
在协议选项卡中,我有:启用:是和全部监听:是
在 "IP Addresses" 选项卡底部的 IPAll 下,"TCP Dynamic ports" 设置为 49178。 (不知道为什么)。
所以我在 Pentaho 的 'table input' 设置中将端口设置为 49178。它设法找到了服务器,但存在有关集成安全性的错误。所以我将 sqljdbc_auth.dll 复制到 C:\Program Files (x86)\Java\jre1.8.0_144 的 bin 和 lib 子文件夹中......现在它可以工作了!
如果我不指定端口,Pentaho 会尝试端口 1433,但它不起作用。
作为参考,我在 Python 和 SQL Alchemy 中使用的连接字符串没有明确指定端口。
params = '?driver=SQL+Server+Native+Client+11.0'
engine = create_engine('mssql+pyodbc://' + ServerName + '/'+ Database + params, encoding ='latin1' )
conn=engine.connect()
SQL 服务器网络配置 --> SQLEXPRESS 协议 --> TCP/IP
在协议选项卡中,我有:启用:是和全部监听:是
在 "IP Addresses" 选项卡底部的 IPAll 下,"TCP Dynamic ports" 设置为 49178。
所以我在 Pentaho 的 'table input' 设置中将端口设置为 49717。
这对我也有用..
我的本地计算机上有 Microsoft SQL Server 2014 Express 运行,Windows 7 PC。
我使用 Python 并且可以毫无问题地连接到服务器(从同一台 PC),使用 SQL alchemy。我还可以使用 Excel 和 PowerPivot 加载项进行连接。
但是,我无法连接 Pentaho - Kettle。
- 我已经从 Microsoft 下载了 JDBC 驱动程序: https://www.microsoft.com/en-gb/download/details.aspx?id=11774
- 我把文件jre8\sqljdbc42.jar 移到了
Pentaho 数据集成安装。我取的文件是jre8,不是jre7,因为我的Java是JRE1.8.0_144
- 然后我将
auth\x86\sqljdbc_auth.dll
中的文件复制到同一个lib文件夹中。我拿了 x86 文件,而不是 x64,因为 Java 在c:\Program Files (x86)\Java\jre1.8.0_144\
中
- 我添加 'table input' 并设置连接类型 = MS SQL 服务器(本机)和访问 = 本机 (JDBC)
- 然后我将
我收到的错误信息是:
Error connecting to database [mydatabase] :org.pentaho.di.core.exception.KettleDatabaseException: Error occurred while trying to connect to the database
Error connecting to database: (using class com.microsoft.sqlserver.jdbc.SQLServerDriver) The TCP/IP connection to the host localhost, port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
org.pentaho.di.core.exception.KettleDatabaseException: Error occurred while trying to connect to the database
Error connecting to database: (using class com.microsoft.sqlserver.jdbc.SQLServerDriver) The TCP/IP connection to the host localhost, port 1433 has failed. Error: "Connection refused: connect. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
我尝试了各种组合,包括指定端口号 1433 并将其留空、使用集成安全性和手动输入密码、将主机名设置为 localhost 和 DESKTOP-MYNAME\SQLEXPRESS,但无济于事.
我已经阅读了很多关于它的讨论,但 none 似乎相关; SQL 服务器确实接受传入连接,例如来自 Python 和 SQL 炼金术。
我运行 SQL Server 2014 配置管理器,并检查:
SQL 服务器网络配置 --> SQLEXPRESS 的协议 --> TCP/IP
在协议选项卡中,我有:启用:是和全部监听:是
在 "IP Addresses" 选项卡底部的 IPAll 下,"TCP Dynamic ports" 设置为 49178。 (不知道为什么)。
所以我在 Pentaho 的 'table input' 设置中将端口设置为 49178。它设法找到了服务器,但存在有关集成安全性的错误。所以我将 sqljdbc_auth.dll 复制到 C:\Program Files (x86)\Java\jre1.8.0_144 的 bin 和 lib 子文件夹中......现在它可以工作了!
如果我不指定端口,Pentaho 会尝试端口 1433,但它不起作用。
作为参考,我在 Python 和 SQL Alchemy 中使用的连接字符串没有明确指定端口。
params = '?driver=SQL+Server+Native+Client+11.0'
engine = create_engine('mssql+pyodbc://' + ServerName + '/'+ Database + params, encoding ='latin1' )
conn=engine.connect()
SQL 服务器网络配置 --> SQLEXPRESS 协议 --> TCP/IP
在协议选项卡中,我有:启用:是和全部监听:是
在 "IP Addresses" 选项卡底部的 IPAll 下,"TCP Dynamic ports" 设置为 49178。
所以我在 Pentaho 的 'table input' 设置中将端口设置为 49717。
这对我也有用..