Service Virtualization

 View Only
  • 1.  JDBC connection with SQL Server

    Posted Jun 19, 2017 04:40 AM

    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.



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


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

    There was a SQLException: 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.itko.lisa.jdbc.JDBCNode.getConnection(
    at com.itko.lisa.jdbc.JDBCNode.executeSQL(
    at com.itko.lisa.jdbc.JDBCNodeEditor.doExec(
    at com.itko.lisa.jdbc.JDBCNodeEditor$6.doCallback(
    at com.itko.util.swing.panels.ProcessingDialog$

  • 2.  Re: JDBC connection with SQL Server
    Best Answer

    Posted Jun 19, 2017 11:32 AM

    What port number did you use?  

    And, is your OJDBC.jar in DevTest compatible with the version of SQL Server you are using?  DevTest ships with ojdbc7- It is located in LISA_HOME\lib\shared.  Ensure that version is recommended and compatible.  If not, obtain the correct jar and rename this one.  Then, restart all of the DevTest servers.


    The port that DevTest connects to on the SQL Server instance is generally provided the DBA or the person that installed the database server. The default port is usually 1433, but some organizations change the default port.


    If you have access to the machine that is running SQL Server, you might get the PID associated with SQL Server and use netstat -oan to see if you can determine the port that way.  

  • 3.  Re: JDBC connection with SQL Server

    Posted Jun 23, 2017 06:04 AM

    Hey Joel, Sorry for a delayed response, I was stuck with some other work.


    I used the default port 1433 to connect. I checked ojdbc7- as well. However later found the issue was - TCP/IP port, it wasn't enabled at server side.


    Finally this is resolved. 



  • 4.  Re: JDBC connection with SQL Server

    Posted Oct 22, 2018 06:27 AM

    Hi Ritu

       I am facing the same issue can you mention how to enable TCP/IP port.