Service Virtualization

Expand all | Collapse all

MS SQL database connectivity issue2

  • 1.  MS SQL database connectivity issue2

    Posted Dec 18, 2017 11:15 AM

    Hi,

     

    I'm trying to connect to MS SQL DB through DevTest. I entered JDBC Driver as com.microsoft.sqlserver.jdbc.SQLServerDriver and Connect String as jdbc:sqlserver://<IP address>:<port>;databaseName=<XXXX> and entered userId and Password. When I click on "Test Connection" button I'm getting below error

     

    Message:

    There was a SQLException: com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "SQL Server did not return a response. The connection has been closed. ClientConnectionId:3eb69bbe-3025-43de-85a1-bb38706dfdc7".

    Stack Trace:

    com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "SQL Server did not return a response. The connection has been closed. ClientConnectionId:3eb69bbe-3025-43de-85a1-bb38706dfdc7".
     at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1667)
     at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1668)
     at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1323)
     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(Unknown Source)
    Caused by: java.io.IOException: SQL Server did not return a response. The connection has been closed. ClientConnectionId:3eb69bbe-3025-43de-85a1-bb38706dfdc7
     at com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.ensureSSLPayload(IOBuffer.java:651)
     at com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.readInternal(IOBuffer.java:708)
     at com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.read(IOBuffer.java:700)
     at com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream.readInternal(IOBuffer.java:895)
     at com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream.read(IOBuffer.java:883)
     at sun.security.ssl.InputRecord.readFully(Unknown Source)
     at sun.security.ssl.InputRecord.read(Unknown Source)
     at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
     at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
     at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
     at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
     at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1618)
     ... 10 more

     

    Please help me to resolve this issue.

    Attached screenshot for reference



  • 2.  Re: MS SQL database connectivity issue2

    Broadcom Employee
    Posted Dec 18, 2017 02:54 PM

    What version of DevTest are you on?  

    Is your SQL Server Windows Authentication only or Mixed Mode?



  • 3.  Re: MS SQL database connectivity issue2

    Posted Dec 19, 2017 03:57 PM

    I'm using Devtest 8.5.0(8.5.0.289) version. We are using Mixed Mode. MS SQL server version is 2012



  • 4.  Re: MS SQL database connectivity issue2
    Best Answer

    Broadcom Employee
    Posted Dec 19, 2017 04:08 PM

    Srikanth is right, looks like the driver being used is incorrect. Are you using the Driver delivered with DevTest 8.5.0? This driver is sqljdbc4-4.0.jar.  If would be located in the DEVTEST_HOME\lib\shared folder.

     

    Note:  DevTest 8.5.0 is End of Service, I would suggest upgrading to a supported release.  The latest version is DevTest 10.2.



  • 5.  Re: MS SQL database connectivity issue2

    Posted Dec 19, 2017 04:13 PM

    Hi Marcy,

     

    Could you please let me know correct driver which support Devtest v8.5.0 .

    I'm new to this tool and just started exploring on this tool.

     

     sqljdbc4-4.0.jar is the jar file available in lib\Shared drive.



  • 6.  Re: MS SQL database connectivity issue2

    Broadcom Employee
    Posted Dec 19, 2017 04:47 PM

    This is the right driver to use with DevTest 8.5.0.   This is my \lib\shared:

     

     

    What I would do is to use a JDBC Connect tool like Squirrel and make sure your connection string works outside of DevTest.

     

    Also, instead of using just the Test button from the step, actually run your test case in the ITR. 

     

    Before you execute the test case in ITR, from the Tool bar choose Help -> HTTP/SSL Debug on. 

     

    You will see an area at the bottom of the Workstation come up. 

     

     

    Run your test case and it will show any error messages.

     

    This will give you more detail of the error message.

     

    Hope this helps.



  • 7.  Re: MS SQL database connectivity issue2

    Posted Dec 20, 2017 03:50 AM

    Can you copy the jar file to "hotdeploy" folder and run the test once because we did the same thing for invoking the informix DB. Thanks.



  • 8.  Re: MS SQL database connectivity issue2

    Posted Dec 20, 2017 12:03 PM

    Hi Marcy,

     

    Thanks for the update

     

    I just upgraded my DevTest version from 8.5 to 10 and did MS SQL server connectivity in 10 version.

     

    It was working fine perfectly. Thanks Again!



  • 9.  Re: MS SQL database connectivity issue2

    Broadcom Employee
    Posted Dec 20, 2017 01:10 PM

    I am glad everything is working for you.



  • 10.  Re: MS SQL database connectivity issue2

    Broadcom Employee
    Posted Dec 18, 2017 10:39 PM

      And also, please share the version of MS SQL server database are you using?,  

       This error you will see if you are using incorrect driver jar file has used for the connectivity or  incorrect jdk/jvm configured on your machine. For more details, go through below link:

    Intermittent JDBC Connectivity issue – The driver could not establish a secure connection to SQL Server by using Secure … 



  • 11.  Re: MS SQL database connectivity issue2

    Posted Dec 19, 2017 04:09 PM

    I'm using Devtest 8.5.0(8.5.0.289) version. We are using Mixed Mode. MS SQL server version is 2012.
    I'm using sqljdbc4-4.0 jar file . I downloaded new jar sqljdbc42 but while running the step . com.microsoft.sqlserver.jdbc.SQLServerDriver driver is calling old jar.

     

    JDBC driver: com.microsoft.sqlserver.jdbc.SQLServerDriver

    Connect String : jdbc:sqlserver://RCVWA00A0017:11001;databaseName=cicctoasisdata

     

    Please help me to resolve this issue as I'm stuck with this for the past 1 week.