1
votes

While making a database connection in pentaho report designer using JDBC, I am getting the following error :

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

Error connecting to database: (using class net.sourceforge.jtds.jdbc.Driver) Network error IOException: Permission denied: connect

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

1

1 Answers

1
votes

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.

Put the jar that came with the JTDS package here: 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*). Fire up report designer.

New database connection:

  • Give it a connection name.
  • Set connection type to MS SQL Server, Native JDBC connection. The "MS SQL Server(Native)" connection did not work for me.
  • Host name: the server's name where the Database sits. Server1, for example.
  • 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.
  • 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.
  • 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

*let's not get caught up on the obviously challenged naming convention. I know, I know.