How to execute set of multiple SQL queries in Load Runner?
Which component in LR would be used to run the SQL Queries?

Answer Posted / rajat

Follow below mentioned steps in order to execute query
through LR script-

(1) Establish conn with DB
lrd_open_connection(&Con1, LRD_DBTYPE_ORACLE, "bb",
"lion", "hammer", "", 0, 0, 0);

(2) Enter query
lrd_stmt(Csr1, "select ename from employee where
(sal>=1000)\n", -1, 1, 1, 0);

(3) lrd_bind_col(Csr1, 1, &D21_ENAME, 0);

(4) Execute query
lrd_exec(Csr1, 0, 0, 0, 0);

(5) lrd_fetch(Csr1, -3, 1, 0, PrintRow24, 0);


(6) lrd_close_cursor(&Csr2, 0);

(7) lrd_close_connection(&Con1, 0, 0);

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are the skip functions in Load Runner?

1999


What are monitors?

799


How load runner interacts with the application?

1056


What are the information crating for each host?

847


How many vusers are required for load testing?

798


What are the loadrunner testing process?

843


What are all the types of goals in goal-oriented scenario of load runner?

788


Which loadrunner component does the recording of performance test scenario?

839


What should be done to view parameter substitution in the execution log?

809


How is automated correlation configured?

783


How will you stop the execution of a script on error?

862


How many types of graphs are available in loadrunner?

808


How could you measures Https/Sec ?

2046


How are concurrent users differing from simultaneous users?

754


What are the challenges that you will face to script the step “select all” and then “delete” for any mail account?

1185