从JMeter运行存储过程 [英] Running Stored Procedure From JMeter
问题描述
我有一个存储过程,如下所述,我将运行该过程以使用PL/SQL Developer自动创建一些测试数据.一切正常.
I have a stored procedure as below which I run to create some test data automatically using PL/SQL Developer. It just runs fine.
begin
create_test_data('000000316F1422C8','N',1,'2016-01-26');
end;
/
我正在使JMETER中的某些项目自动化,而在安装过程中,我需要创建此数据.我尝试使用JDBC连接到Oracle DB.Request Sampler可以触发运行正常的Select Queries.
I was automating some project in JMETER and there as part of setup I need to create this data. I tried to connect to Oracle DB using JDBC Request Sampler can fire Select Queries which are working fine.
现在,我想运行此存储过程以从JMETER生成数据:我尝试使用JDBC Request采样器并复制了上面的代码,但是它不起作用.
Now I want to run this Stored Procedure to Generate the data from JMETER: I tried to use JDBC Request sampler and copied the above code but it doesn't work.
有人可以帮忙吗?
- JDBC请求采样器是否是运行此存储过程的正确方法
- 当我从JDBC Request Sampler运行它时,出现以下错误:
a.错误1
ORA-06550: line 4, column 1:
PLS-00103: Encountered the symbol "/" The symbol "/" was ignored.
b.错误2如果我从最后一行删除斜线
b. Error 2 If I remove slash from the last line
ORA-06550: line 2, column 3:
PLS-00201: identifier 'CREATE_NEXNET_TEST_DATA' must be declared
ORA-06550: line 2, column 3:
PL/SQL: Statement ignored
- 最后我们如何验证存储过程是否可以成功运行
非常感谢!
推荐答案
是的,JMeter能够调用存储过程,将Callable Statement
用作查询类型"并提供相关的参数值和类型.
Yes, JMeter is capable of invoking stored procedures, Use Callable Statement
as "Query Type" and provide relevant Parameter values and types.
参考文献:
- https://bz.apache.org/bugzilla/show_bug.cgi?id=54048
- Debugging JDBC Sampler Results in JMeter
这篇关于从JMeter运行存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!