Forum Discussion

NishantJadhav's avatar
NishantJadhav
Occasional Contributor
9 years ago

Getting Error at JDBC Request : Can't get the Connection for specified properties

 

Spoiler

Hi,

 

 

I am getting error in JDBC request on test connection while using com.microsoft.sqlserver.jdbc.SQLServerDriver driver

 

Error :

Can't get the Connection for specified properties; com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host has failed. java.net.ConnectException: Connection refused: connect

 

Connection string :

jdbc:sqlserver://SD*****103\SQL*****:1433;databaseName=dbname;user=***user;password=PASS_VALUE

 

 

The same is working with Groovy script, but failing on JDBC request.

 

Please help on this as I'm unable to proceed further, this is a complete blocker for me.

 

Thanks in advance Smiley Happy

 

  • Got the answer.

     

    If you are using sqljdbc4.jar remove sqljdbc.jar from \<sopaui>\ext folder.

     

    Check if port specified is open with Microsoft SQL Server Configuration manager, if not open it and restart the server.

     

    You can also remove the port number instead of opening it.

    To remove port from connection string goto Project > JDBC Connections > Double click the connection string and remove the port number.

     

    Done

     

    Worked for me:

    New conn. string :

     

    jdbc:sqlserver://SDCQA*****\*****databaseName=****;user=user;password=PASS_VALUE

     

    :) :D

  • NishantJadhav's avatar
    NishantJadhav
    Occasional Contributor

    Got the answer.

     

    If you are using sqljdbc4.jar remove sqljdbc.jar from \<sopaui>\ext folder.

     

    Check if port specified is open with Microsoft SQL Server Configuration manager, if not open it and restart the server.

     

    You can also remove the port number instead of opening it.

    To remove port from connection string goto Project > JDBC Connections > Double click the connection string and remove the port number.

     

    Done

     

    Worked for me:

    New conn. string :

     

    jdbc:sqlserver://SDCQA*****\*****databaseName=****;user=user;password=PASS_VALUE

     

    :) :D