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

Hello Friends, Can anyone please let me know about Performance testing health care EDI ( 270,271, 835 ect). I need as detailed answer as possible. I am going to use LoadRunner for load testing. I would really really really appreciate your help. Thanks, Piyush

1659


What are the different types goals in goal-oriented scenario?

566


What is run-time-setting?

645


How you set maximum number of vuser that a host can run?

638


What are monitors?

604






What is vugen recording and scripting?

667


How is vugen script modified after recording?

701


What is performance testing in loadrunner?

577


What would be your recommendation to improve performance measure?

601


What is the difference between load, performance testing?

553


What is the process for developing a vuser script?

545


What is scenario default?

648


What component of loadrunner is used to record a script?

568


What are the vuser components in loadrunner?

692


How many types of graphs are available in loadrunner?

585