Highlighted
Absent Member.
Absent Member.
830 views

How to Invoke a batch file using Loadrunner

Hi,

Can someone tell me how to invoke a batch file using loadrunner script? The .bat file is placed in C:\Temp. On invoking this file, SQLPLUS is called and a stored procedure will be executed. I tried using HTML/HTTP and RTE protocols. But it dint work out.

Any information about this is appreciated.

Thank You
0 Likes
3 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: How to Invoke a batch file using Loadrunner

You may use system funtion to execute an operating system command.
0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: How to Invoke a batch file using Loadrunner

Use system command

Example:
system ("c:\\mybatch.bat");
system("c:\\windows\\system32\\cmd.exe");

0 Likes
Highlighted
Absent Member.
Absent Member.

Re: How to Invoke a batch file using Loadrunner

Hi,

Thank You so much your response. The batch file has being triggered successfully.

This batch will open a .sql file when triggered manually. But there seems to be problem in opening the .sql file when the batch file is triggered via loadrunner. I get the following error 'SP2-0310: unable to open file stprocedure.sql'. Why is this behaviour observed?

Thank You.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.