10-22-2010 04:45 AM
So yes, LR has custom functions for making connections to a database and running queries and I know there is a suite of database specific vuser types, but I am looking for a solution that allows me to run SQL that can be plugged into a standard web type vuser. I'm sure it's possible; I'm looking for the most elegant way.
Basically I want to be able to establish a connection (to Oracle 10g), run some simple SQL, and then parse the results.
This is initially for a specific requirement to track the session count but I can straight away see all sorts of benefits to being able to do this.
I can also think of some possible solutions, like:
Calling out to the command line and doing something there
Running a shell script (via the command line)
Setting up a simple web interface to execute SQL and screen scraping that
But this seemed like something that has probably been done many times before so worth a post.
Solved! Go to Solution.
10-28-2010 05:19 PM
Actually - you can manually record the SQL calls with an Oracle 2-Tier virtual user - from behind a sql*plus session...to execute the query and record the calls into that virtual user.
Then you can manually merge that script with your web virtual user script.
It can be done - I did a presentation back in 1999 on exactly doing this with Web & ODBC.
You could also do this with an external program, if that works better for you.
Performance Testing and Engineering Guru
02-29-2012 08:18 AM
I am too looking to see if I can run SQL queries from the HTTP/Click and Script protocols but I would be querying SQL Server. I worked at a previous company where a developer had a Loadrunner script that loaded a dll that had C methods to connect to a database via ODBC and able to do queries. I don't know if he created that dll or if he found it somewhere online(the developer was no longer at the company when I came in). Do you all know of such a dll out there?
12-16-2012 10:22 PM
I run few Performance Tests in my Org and I have a specific requirement where I have to run a simple SQL query in HTTP/HTMl LR script, the SQL query I wanted to run is just an update query on a simple table.
Kindly request you to provide me a script or procedure which I can use to do this, since your question here is also based on the same, kindly let me know if you found a solution and were you able to run the SQL query from LR script
With Best Regards