AnsweredAssumed Answered

JDBC connection with SQL Server

Question asked by Ritu Chowdhary on Jun 19, 2017
Latest reply on Jun 23, 2017 by Ritu Chowdhary

Dear all - I'm trying to connect Devtest 10.1 with MS SQL Server, however unable to identify the Port.

We have set up Devtest on one machine and SQL Server Developer edition on anther machine.

I'm able to ping the server. Can someone please help me - how to identify the port details here.

 

Driver                     com.microsoft.sqlserver.jdbc.SQLServerDriver

Connect string       jdbc:sqlserver://<ServerName>:<Port>

 

When I try to connect - I'm getting the below error:

There was a SQLException: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host <ServerName>, port <Port> 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.".

Stack Trace:

at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:190)
at com.microsoft.sqlserver.jdbc.SQLServerException.ConvertConnectExceptionToSQLServerException(SQLServerException.java:241)
at com.microsoft.sqlserver.jdbc.SocketFinder.findSocket(IOBuffer.java:2243)
at com.microsoft.sqlserver.jdbc.TDSChannel.open(IOBuffer.java:491)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1309)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)
at com.itko.lisa.jdbc.JDBCNode.getConnection(JDBCNode.java:627)
at com.itko.lisa.jdbc.JDBCNode.executeSQL(JDBCNode.java:370)
at com.itko.lisa.jdbc.JDBCNodeEditor.doExec(JDBCNodeEditor.java:483)
at com.itko.lisa.jdbc.JDBCNodeEditor$6.doCallback(JDBCNodeEditor.java:417)
at com.itko.util.swing.panels.ProcessingDialog$2.run(ProcessingDialog.java:194)
at java.lang.Thread.run(Thread.java:745)

Outcomes