简体   繁体   English

Pentaho Report Designer与MS SQL Server 2008中的数据库连接

[英]Database connection in Pentaho Report Designer with MS SQL server 2008

While making a database connection in pentaho report designer using JDBC, I am getting the following error : 在使用JDBC在pentaho报表设计器中建立数据库连接时,出现以下错误:

Error connecting to database [database_name] : org.pentaho.di.core.exception.KettleDatabaseException: Error occured while trying to connect to the database 连接到数据库[database_name]时出错:org.pentaho.di.core.exception.KettleDatabaseException:尝试连接到数据库时发生错误

Error connecting to database: (using class net.sourceforge.jtds.jdbc.Driver) Network error IOException: Permission denied: connect 连接数据库时出错:(使用类net.sourceforge.jtds.jdbc.Driver)网络错误IOException:权限被拒绝:connect

org.pentaho.di.core.exception.KettleDatabaseException: Error occured while trying to connect to the database org.pentaho.di.core.exception.KettleDatabaseException:尝试连接数据库时发生错误

I can't comment unfortunately, and without more information my answer will be a shot in the dark, therefore I will attempt to describe the perfect connection that you can use to connect to SQL Server 2008 via JTDS. 不幸的是,我无法发表评论,没有更多信息,我的答案将是一片漆黑,因此,我将尝试描述一种完美的连接,您可以使用它通过JTDS连接到SQL Server 2008。

Put the jar that came with the JTDS package here: pentaho\\report-designer\\lib\\jdbc . 将JTDS软件包随附的jar放在这里: pentaho\\report-designer\\lib\\jdbc If you wish to take advantage of the Windows Authentication, also grab the ntmlauth.dll file and put it in either System32 (for 64 bit Windows) or SysWOW64 (for 32 bit Windows, that's up to your configuration*). 如果您希望利用Windows身份验证,还可以获取ntmlauth.dll文件,并将其放入System32(对于64位Windows)或SysWOW64(对于32位Windows,取决于您的配置*)。 Fire up report designer. 启动报表设计器。

New database connection: 新的数据库连接:

  • Give it a connection name. 给它一个连接名。
  • Set connection type to MS SQL Server, Native JDBC connection. 将连接类型设置为MS SQL Server,本机JDBC连接。 The "MS SQL Server(Native)" connection did not work for me. “ MS SQL Server(本机)”连接对我不起作用。
  • Host name: the server's name where the Database sits. 主机名:数据库所在的服务器的名称。 Server1, for example. 例如,Server1。
  • Database Name: Take a wild guess what this might be. 数据库名称:大胆猜测这可能是什么。 Yup, here you enter your database name. 是的,在这里输入您的数据库名称。 Northwind, for example. 例如罗斯文。
  • Instance name: Instance name, if you have any. 实例名称:实例名称(如果有)。 Not mandatory. 不是强制性的。
  • Port number: default SQL server port is 1433. 端口号:默认的SQL Server端口为1433。
  • User name / password: define one that has access to the database. 用户名/密码:定义一个有权访问数据库的用户名/密码。 Leave it blank if you listened to me earlier and put the .dll file in the right directory to use Windows Authentication. 如果您以前听过我的话,请将其保留为空白,然后将.dll文件放在正确的目录中以使用Windows身份验证。
  • Rejoice. 麾。

IN CASE you ever need the connection string and driver for SQL server connection: driver: net.sourceforge.jtds.jdbc.Driver URL (or string): jdbc:jtds:sqlserver://HostName:1433/databaseName 在某些情况下,您需要连接字符串和用于SQL Server连接的驱动程序:驱动程序:net.sourceforge.jtds.jdbc.Driver URL(或字符串):jdbc:jtds:sqlserver:// HostName:1433 / databaseName

* let's not get caught up on the obviously challenged naming convention. * 让我们不要陷入明显挑战的命名约定。 I know, I know. 我知道我知道。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM