Forum Discussion
Hi,
ok - I can't help you with the groovy - but you don't necessarily need to use groovy to do it anyway.
if its cloud SQLServer or Windows Azure SQL - you can't use JDBC to connect to the database if its cloud (depending on the SaaS contract I believe)
I've had a quick read and you can use JDBC - see the following: https://www.cdata.com/kb/tech/cosmosdb-jdbc-dbv.rst
You will need to download the correct .jar file drivers for the connection (you need to determine what version of cosmos your are trying to connect to) - try here https://www.cdata.com/drivers/cosmosdb/jdbc/ to pick up the driver files you need. You need to add in the driver files to ReadyAPI!/bin/ext directory in your program files directory (e.g. C:\Program Files\SmartBear\ReadyAPI-2.5.0\bin\ext)
You will then need to edit the JDBC preferences adding the appropriate jdbc connection - see the photo
In the Driver field - input the following: CosmosDBDriver/cdata.jdbc.cosmosdb.CosmosDBDriver
In the Connection field input you need to add the following:
jdbc:cosmosdb:Server=anhohmongo.documents.azure.com;Port=10255;Database=test;User=contoso123:0Fc3IolnL123;Password=test;
One other thing - you will need to ensure the version of Java you are using for your runtime is correct relative to the .jar files you are using a device drivers for the connection. I'm assuming you already have JRE or JDK installed. there is a reason (that I cant remember) that may impact you - even though you just need runtime files - grab the JDK anyway - it has an extended set - there is a reason why you should grab the JDK rather than the JRE - I just cant remember what it is.
See if that helps and hit me back,
nice one,
richie
- Arunsrs7 years agoOccasional Contributor
Hello Richie,
Azure db is non sql and DB is document type .On top i am not able to find any drived related to that .Could you please help me in this
- richie7 years agoCommunity Hero
ok - first things first - ignore ReadyAPI! for now
have you got a db connection via a db interrogation tool already? i.e. have you got a connection to the db via dBvisualiser or any other DB interrogation tool?
If you can use one of those tools to hit the DB - you should be able to setup the connection in ReadyAPI! - cos ReadyAPI's connection is doing the same thing as those db interrogation tools
It shouldn't matter whether it's a NOSQL DB or not - COSMOS is a noSQL DB - but it still uses JDBC so you should be ok
cheers,
richie
- Arunsrs7 years agoOccasional Contributor
i used the following connection in SOAP UI 5.4.0:
Driver :CosmosDBDriver/cdata.jdbc.cosmosdb.CosmosDBDriver
Connection String -jdbc:cosmosdb Server=dis4upsrudiqa.documents.azure.com;Port=443;Key="qAZ8rWJsGCbwIP0yNCoM0hiu6OcCPbqu4yT8qtRhVqXpOghh503rNK5QN3tg2xlfCDB6g1OrDjaZnnwC17OkKQ=="
Related Content
Recent Discussions
- 18 hours ago
- 17 days ago