LoadRunner Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Does Loadrunner Vuser support calling a SQL file?

Highlighted
ray500
Collector

Does Loadrunner Vuser support calling a SQL file?

Is there anyway to call a SQL file(specifically SQL Server) in Loadrunner and have Loadrunner execute it?   I know you can run SQL statements using lr_db_executeSQLStatement(Web Service protocol) or by lrd_stmt(ODBC protocol)  but these accept one SQL statement.   I need to run a large SQL script that would be too complex to break down into several of the above functions.

 

If running a file is not an option,  what about calling stored procedures?  Can they be called in Loadrunner?

 

Thanks,

Raymond

4 REPLIES
Editus
HPE Expert

Re: Does Loadrunner Vuser support calling a SQL file?

This is not possible, however  you can create a stored procedure on SQL and callit from LoadRunner.

hope this helps.

 

cheers

ray500
Collector

Re: Does Loadrunner Vuser support calling a SQL file?

Thanks Editus!   I also have started using the .NET protocol using C# in Loadrunner and being able to call multiple SQL statements and parameterize much better than in ODBC protocol.

Vaibhav-666
Occasional Contributor

Re: Does Loadrunner Vuser support calling a SQL file?

Hi,

 

I would really appreciate if you can post some .NET examples to execute long queries from a SQL File.

 

Thanks in advance,

 

Vaibhav

Lr_test
Occasional Contributor

Re: Does Loadrunner Vuser support calling a SQL file?

Writing SQL statements in vugen is explained in a simple way

 

http://loadrunner95.blogspot.com/2016/10/oracle-database-load-testing.html

//Add this to "OnDomLoad" event