如何在Jmeter中使用jdbc连接设置服务器输出 [英] how to set serveroutput on using jdbc connection in Jmeter
问题描述
我正在尝试使用JDBC请求执行以下PL/SQL代码块
I am trying to execute a block of PL/SQL code using JDBC request as below
set serveroutput on;
declare
..
BEGIN
DBMS_OUTPUT.ENABLE();
..
..
DBMS_OUTPUT.PUT_LINE(X);
END;
但是我在响应中得到错误,显示为ORA-00922: missing or invalid option
.如果删除set serveroutput on
,则说明SQL块正在成功执行.但是我在Response中没有任何值.
But I am getting error as ORA-00922: missing or invalid option
in the Response. If I remove the set serveroutput on
, the SQL block is executing successfully. But I am not getting any values in the Response.
我试图在SQL Developer中运行完全相同的SQL块,但确实向我显示了期望的值.
I tried to run the exact same piece of SQL block in SQL Developer and it does show me the values expected.
如何运行此代码块并获取要在JMeter中填充的值?
How do I run this block of code and get the values to be populated in JMeter ?
推荐答案
set serveroutput on
SQLPlus特定命令.您必须在PL之后调用 DBMS_OUTOUT.GET_LINES /SQL块执行.
set serveroutput on
SQLPlus specific command. You have to call DBMS_OUTOUT.GET_LINES after PL/SQL block execution.
这篇关于如何在Jmeter中使用jdbc连接设置服务器输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!