AnsweredAssumed Answered

Establishing connection with MS SQL server in spoon

Question asked by Hema R R on Jul 10, 2019
Latest reply on Jul 10, 2019 by Johan Hammink

Hi this is Hema. I am a data analyst. Require help to establish connection to MS SQL server using spoon.

Please help me with the process, tried many times but not able to connect. Getting the below error message:

Error connecting to database [Test] :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)
Network error IOException: Connection refused: connect

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)
Network error IOException: Connection refused: connect

 at org.pentaho.di.core.database.Database.normalConnect(Database.java:472)
 at org.pentaho.di.core.database.Database.connect(Database.java:370)
 at org.pentaho.di.core.database.Database.connect(Database.java:341)
 at org.pentaho.di.core.database.Database.connect(Database.java:331)
 at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:83)
 at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestResults(DatabaseFactory.java:112)
 at org.pentaho.di.core.database.DatabaseMeta.testConnectionSuccess(DatabaseMeta.java:2811)
 at org.pentaho.ui.database.event.DataHandler.testDatabaseConnection(DataHandler.java:621)
 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.swt.tags.SwtButton.access$500(SwtButton.java:43)
 at org.pentaho.ui.xul.swt.tags.SwtButton$4.widgetSelected(SwtButton.java:137)
 at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
 at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
 at org.eclipse.swt.widgets.Display.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.xul.KettleDialog.show(KettleDialog.java:80)
 at org.pentaho.di.ui.xul.KettleDialog.show(KettleDialog.java:47)
 at org.pentaho.di.ui.core.database.dialog.XulDatabaseDialog.open(XulDatabaseDialog.java:116)
 at org.pentaho.di.ui.core.database.dialog.DatabaseDialog.open(DatabaseDialog.java:61)
 at org.pentaho.di.ui.repo.controller.RepositoryConnectController.lambda$createConnection$1(RepositoryConnectController.java:129)
 at org.eclipse.swt.widgets.RunnableLock.run(Unknown Source)
 at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Unknown Source)
 at org.eclipse.swt.widgets.Display.runAsyncMessages(Unknown Source)
 at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
 at org.pentaho.di.ui.repo.dialog.RepositoryDialog.open(RepositoryDialog.java:95)
 at org.pentaho.di.ui.repo.dialog.RepositoryDialog.open(RepositoryDialog.java:77)
 at org.pentaho.di.ui.repo.dialog.RepositoryDialog.open(RepositoryDialog.java:73)
 at org.pentaho.di.ui.repo.dialog.RepositoryDialog.openCreation(RepositoryDialog.java:109)
 at org.pentaho.di.ui.repo.menu.RepositoryConnectMenu$1.widgetSelected(RepositoryConnectMenu.java:122)
 at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
 at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
 at org.eclipse.swt.widgets.Display.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:1381)
 at org.pentaho.di.ui.spoon.Spoon.waitForDispose(Spoon.java:7817)
 at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:9179)
 at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:707)
 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)
Network error IOException: Connection refused: connect
 at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:583)
 at org.pentaho.di.core.database.Database.normalConnect(Database.java:456)
 ... 53 more
Caused by: java.sql.SQLException: Network error IOException: Connection refused: connect
 at net.sourceforge.jtds.jdbc.JtdsConnection.<init>(JtdsConnection.java:436)
 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:567)
 ... 54 more
Caused by: java.net.ConnectException: Connection refused: connect
 at java.net.DualStackPlainSocketImpl.connect0(Native Method)
 at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
 at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
 at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
 at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
 at java.net.PlainSocketImpl.connect(Unknown Source)
 at java.net.SocksSocketImpl.connect(Unknown Source)
 at java.net.Socket.connect(Unknown Source)
 at net.sourceforge.jtds.jdbc.SharedSocket.createSocketForJDBC3(SharedSocket.java:288)
 at net.sourceforge.jtds.jdbc.SharedSocket.<init>(SharedSocket.java:251)
 at net.sourceforge.jtds.jdbc.JtdsConnection.<init>(JtdsConnection.java:331)
 ... 58 more
Hostname: HEMAR01-PC
Port: 1433
Database name: TestDB

Outcomes