Prepare for your Next Interview
This is a discussion on Querying Thru LR within the LoadRunner forums, part of the Software Testing category; Hi, The objective is to find the response time for a set of SQL Queries which are to be given directly to the DB Server. Can anybody help me out ...
|
|||
|
Querying Thru LR
Hi,
The objective is to find the response time for a set of SQL Queries which are to be given directly to the DB Server. Can anybody help me out in "how to proceed", "the appropriate protocol to be use" & also if possible some sample scripts illustrating the procedure. Thanks in advance. - VK.Reju |
| The Following User Says Thank You to vk.reju For This Useful Post: | ||
| Sponsored Links |
|
|||
|
Re: Querying Thru LR
Hi,
Providing you have sql queries, you should use one of the following protocols in LoadRunner, connect to the database and run the query. The code is different in each of the protocols, I have included an example relevant for Oracle protocol Protocols: adodb, odbc, oracle Oracle protocol run query sample lrd_ora8_handle_alloc(OraEnv1, STMT, &OraStm1, 0); lrd_ora8_stmt(OraStm1, lr_eval_string(" lrd_ora8_exec(OraSvc1, OraStm1, 0, 0, &uliRowsProcessed, 0, 0, 0, 0, 0); lrd_handle_free(&OraStm1, 0); You need to wrap these in a transaction and then you can montior the response time. You also need to open connection to the database. If you record an application that connects to the database and run a query, you will get the exact staructure you are looking for. If you are still using 8.1 version, you can find examples under Hope it helps shlomini |
|
|||
|
Re: Querying Thru LR
Hi,
Thank you for the reply. But is there any other way to script without using and application that connects to the database? I received few samples in java, but i want to know whether is it possible in C base scripting. |
|
|||
|
Re: Querying Thru LR
There is no way to query a database without connecting it first. If you can't use the protocols I have mentioned because you don't have a license for it, then you can write the code in C/C++ on your own. I think there is no standard in C for that, but C++ have it.
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Exforsys.com Querying Data with Oracle XQuery | admin | Web Design | 0 | 05-04-2008 12:10 PM |
| Querying a DOM Document with XPath | admin | Web Design | 0 | 04-21-2008 10:00 AM |
| Faster approach for querying | zakirhere | Database General | 1 | 02-18-2008 08:15 AM |