0
votes

I am trying to connect to Microsoft sql server 2018 from SOAP ui by creating a JDBC Request, but geeting Error getting response; null in logs.

Note: i have added mssql-jdbc-7.2.2.jre11 to ext folder in SOAP UI.

External Folder

SOAP-UI 5.5 JDBC Request

Driver: com.microsoft.sqlserver.jdbc.SQLServerDriver

Connection String: jdbc:microsoft:sqlserver://localhost; databaseName=Amazon;integratedSecurity=true;

Query: select * from userbase

1
Please update your question with a sample of your codeou_ryperd
Thank you for your feedback, updated the question accordingly...could you please help me on thisAbhijit khuntia
Please try connecting and querying in a Groovy script test step and share the outputou_ryperd
i got the following error while running groovy scrip// java.sql.SQLException: No suitable driver found for jdbc:microsoft:sqlserver://localhost; databaseName=Amazon;integratedSecurity=true; error at line:Abhijit khuntia
So now you can troubleshoot. Either it is the wrong jar version, or it is not loading properly, or your connection string is not right. Also you are using integrated security which may or may not work with SoapUIou_ryperd

1 Answers

0
votes

I don't use the JDBC step in SoapUI, but rather do my database steps in a Groovy script test step.

I also have had more success with the jTDS driver for MS-SQL.

A sample connection string with domain authentication/integrated security is:

def conn = Sql.newInstance("""jdbc:jtds:sqlserver://SERVERNAME:1433/dbname;
                 useLOBs=false;
                 instance=SERVERNAME;
                 autoCommit=true;
                 useNTLMv2=true;
                 domain=MYDOMAIN",
                 "MyUser", "MyPassword", "net.sourceforge.jtds.jdbc.Driver""")

Then:

myDB.eachRow("select * from userbase;"){
    //do something with the data
}

I would also suggest that you select specific columns, not * From there you can put the data in a file or populate property values or whatever.