You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Jelmer de Haas <J....@kpn-is.nl> on 2006/09/21 16:56:29 UTC

Return values on Stored Procedure

I have managed to call the Stored Procedure (SP) on Oracle 10 from
Jmeter. 

This SP (see below) returns three values. But in the Result Tree these
are not shown, only respons is 'Executed'. 

Is there some way to show these values and do some kind of response
assertion on them? 


DECLARE
  
  returnmessage VARCHAR(256);
  ipaddress VARCHAR(256);
  fnumber VARCHAR(256);
  brand VARCHAR(256);
  returncode NUMBER;
  creationdate NUMBER;

BEGIN
 
  BLACKLISTIP ('test1@domain.com', '127.0.0.66', 'brand',
returncode,returnmessage,creationdate);
  DBMS_OUTPUT.PUT_LINE(returncode);
  DBMS_OUTPUT.PUT_LINE(returnmessage);
  DBMS_OUTPUT.PUT_LINE(creationdate);

END;


Regards,
Jelmer


Re: Return values on Stored Procedure

Posted by Eldon Mellaney <el...@atomssoftware.com>.
Hi Jelmer,

The code that you have included below defines an "anonymous PL/SQL
block", not a "stored procedure". The output of the block is generated
to the equivalent of standard out (in sqlplus, to see the output of
your anonymous PL/SQL block, you need to set serveroutput on.)

Example:

$ sqlplus
sqlplus> set serverout on

In order to *return* *multiple* results to a caller/invoker, you need
to define a *stored procedure* with OUT parameters.

If BLACKLISTIP(...) is defined as a stored procedure with 6 formal
parameters of which the final three are labelled as OUT, you should be
able to call BLACKLISTIP(...) as a stored procedure and obtain all
three result values.

General form of required stored procedure:

sqlplus>
  CREATE OR REPLACE PROCEDURE myProc(result1 OUT VARCHAR2,
                                     result2 OUT VARCHAR2,
                                     result3 OUT VARCHAR2)
  AS
  BEGIN
     result1 := 'some value';
     result2 := 'some other value';
     result3 := 'some different value';
  END myProc;
/

Procedure created.

sqlplus> set serverout on
sqlplus>    declare
    s1 varchar2(40);
    s2 varchar2(40);
    s3 varchar2(40);
  begin
     myProc(s1, s2, s3);
     DBMS_OUTPUT.PUT_LINE(s1);
     DBMS_OUTPUT.PUT_LINE(s2);
     DBMS_OUTPUT.PUT_LINE(s3);
end;
/

some value
some other value
some different value

PL/SQL procedure successfully completed.


Someone is welcome to answer Jelmer's second question relating to the
Result Tree; I have not used Jmeter in this manner.


Best,

Eldon.


Thursday, September 21, 2006, 10:56:29 AM, you wrote:

JdH> I have managed to call the Stored Procedure (SP) on Oracle 10 from
JdH> Jmeter. 

JdH> This SP (see below) returns three values. But in the Result Tree these
JdH> are not shown, only respons is 'Executed'. 

JdH> Is there some way to show these values and do some kind of response
JdH> assertion on them? 


JdH> DECLARE
  
JdH>   returnmessage VARCHAR(256);
JdH>   ipaddress VARCHAR(256);
JdH>   fnumber VARCHAR(256);
JdH>   brand VARCHAR(256);
JdH>   returncode NUMBER;
JdH>   creationdate NUMBER;

JdH> BEGIN
 
JdH>   BLACKLISTIP ('test1@domain.com', '127.0.0.66', 'brand',
JdH> returncode,returnmessage,creationdate);
JdH>   DBMS_OUTPUT.PUT_LINE(returncode);
JdH>   DBMS_OUTPUT.PUT_LINE(returnmessage);
JdH>   DBMS_OUTPUT.PUT_LINE(creationdate);

JdH> END;


JdH> Regards,
JdH> Jelmer


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Return values on Stored Procedure

Posted by sebb <se...@gmail.com>.
As far as I know, this should work.

Which version of JMeter are you using?

What did you set the "Query Type" to?

S.
On 21/09/06, Jelmer de Haas <J....@kpn-is.nl> wrote:
> I have managed to call the Stored Procedure (SP) on Oracle 10 from
> Jmeter.
>
> This SP (see below) returns three values. But in the Result Tree these
> are not shown, only respons is 'Executed'.
>
> Is there some way to show these values and do some kind of response
> assertion on them?
>
>
> DECLARE
>
>  returnmessage VARCHAR(256);
>  ipaddress VARCHAR(256);
>  fnumber VARCHAR(256);
>  brand VARCHAR(256);
>  returncode NUMBER;
>  creationdate NUMBER;
>
> BEGIN
>
>  BLACKLISTIP ('test1@domain.com', '127.0.0.66', 'brand',
> returncode,returnmessage,creationdate);
>  DBMS_OUTPUT.PUT_LINE(returncode);
>  DBMS_OUTPUT.PUT_LINE(returnmessage);
>  DBMS_OUTPUT.PUT_LINE(creationdate);
>
> END;
>
>
> Regards,
> Jelmer
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Return values on Stored Procedure

Posted by Deepak Shetty <sh...@gmail.com>.
Ok first I dont know whether what you want to do is possible (i.e. whether
you can return an OUT cursor and have Jmeter variables set up which
represent the returned rows. )

second can you share the definition of the Ref cursor. I wish to see if you
are returning the Ref Cursor or you are merely using OUT paramaters.
Assuming it is as you say and its an out parameter then

CALL <schema>.<package>.GET_TRANSFER_BY_ID(?,?,?,?) --> also replace schema
package by your schema package or remove them if not needed

Parameter Values = ${P_TRANSFER_ID_1},${LOG_LEVEL},${INSTR_LEVEL},]NULL[
--> Not sure of the null , but try it out. Read the docs if you need to
change the value representing null
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#JDBC_Request

Parameter Type= VARCHAR,INTEGER,INTEGER,OUT 10 (assuming 10 ==
OracleTypes.Cursor , please verify , also verify your other types)

I dont think variables will work because thats for the resultset returned by
the callable statement , which isnt the case in your example. if you
absolutely need to do this , then Id probably use a Java Sampler , or you
might extend the JDBC Request to create your own

regards
deepak



On Mon, Sep 28, 2009 at 9:56 AM, rpaliath <ra...@hotmail.com> wrote:

>
> Deepak, I am not sure of what you are talking about. Can you please send me
> a
> screenshot of what do you think I should be having in the various fields.
>
> Rajiv
>
>
>
> Deepak Shetty wrote:
> >
> > looking at your screen , I dont think what you are doing is correct.
> > The parameter types/values are for the ? binding parameters, you have
> > specified everything explicitly .
> > I also dont think you can return the RefCursor as the variable name , I
> > believe this is only possible if the statement returns a ResultSet (in
> > your
> > case this is an OUT parameter)
> >
> >
> >
> > On Fri, Sep 25, 2009 at 11:05 AM, rpaliath <ra...@hotmail.com>
> > wrote:
> >
> >>
> >> Deepak, I have a ref cursor being returned. How do I declare that? I
> have
> >> a
> >> CSV file which is taking care of the 3 input variable neede
> >> http://www.nabble.com/file/p25616563/jmeter.bmp jmeter.bmp d, but I am
> >> confused about the ref cursor. The JDBC request is going out fine. Here
> >> is
> >> what I see on the "Request" tab of the Results tree
> >>
> >> call <schema>.<package>.GET_TRANSFER_BY_ID (52626820,0,0,P_TRANSFER_O)
> >> But, it is returning a "Invalid Column Type" message.
> >>
> >> Rajiv
> >>
> >>
> >> Deepak Shetty wrote:
> >> >
> >> >
> >>
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#JDBC_Request
> >> >
> >> > see Parameter Types (you'd say something like OUT INTEGER)
> >> >
> >> > If the callable statement has INOUT or OUT parameters, then these must
> >> be
> >> > indicated by prefixing the appropriate parameter types, e.g. instead
> of
> >> > "INTEGER", use "INOUT INTEGER". If not specified, "IN" is assumed,
> i.e.
> >> > "DATE" is the same as "IN DATE".
> >> > If the type is not one of the fields found in java.sql.Types, versions
> >> of
> >> > JMeter after 2.3.2 also accept the corresponding integer number, e.g.
> >> > since
> >> > INTEGER == 4, you can use "INOUT 4".
> >> > There must be as many types as there are placeholders in the
> statement.
> >> >
> >> > regards
> >> > deepak
> >> >
> >> > On Fri, Sep 25, 2009 at 10:30 AM, rpaliath <ra...@hotmail.com>
> >> > wrote:
> >> >
> >> >>
> >> >> Jelmer
> >> >> Can you tell me how you defined the out variables in the JDBC Request
> >> >> screen?
> >> >> Thanks.
> >> >>
> >> >>
> >> >>
> >> >> Jelmer de Haas wrote:
> >> >> >
> >> >> > I have managed to call the Stored Procedure (SP) on Oracle 10 from
> >> >> > Jmeter.
> >> >> >
> >> >> > This SP (see below) returns three values. But in the Result Tree
> >> these
> >> >> > are not shown, only respons is 'Executed'.
> >> >> >
> >> >> > Is there some way to show these values and do some kind of response
> >> >> > assertion on them?
> >> >> >
> >> >> >
> >> >> > DECLARE
> >> >> >
> >> >> >   returnmessage VARCHAR(256);
> >> >> >   ipaddress VARCHAR(256);
> >> >> >   fnumber VARCHAR(256);
> >> >> >   brand VARCHAR(256);
> >> >> >   returncode NUMBER;
> >> >> >   creationdate NUMBER;
> >> >> >
> >> >> > BEGIN
> >> >> >
> >> >> >   BLACKLISTIP ('test1@domain.com', '127.0.0.66', 'brand',
> >> >> > returncode,returnmessage,creationdate);
> >> >> >   DBMS_OUTPUT.PUT_LINE(returncode);
> >> >> >   DBMS_OUTPUT.PUT_LINE(returnmessage);
> >> >> >   DBMS_OUTPUT.PUT_LINE(creationdate);
> >> >> >
> >> >> > END;
> >> >> >
> >> >> >
> >> >> > Regards,
> >> >> > Jelmer
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >>
> http://www.nabble.com/Return-values-on-Stored-Procedure-tp6429881p25615942.html
> >> >> Sent from the JMeter - User mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >> >> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >> >>
> >> >>
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Return-values-on-Stored-Procedure-tp6429881p25616563.html
> >> Sent from the JMeter - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Return-values-on-Stored-Procedure-tp6429881p25648999.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: Return values on Stored Procedure

Posted by rpaliath <ra...@hotmail.com>.
Deepak, I am not sure of what you are talking about. Can you please send me a
screenshot of what do you think I should be having in the various fields.

Rajiv



Deepak Shetty wrote:
> 
> looking at your screen , I dont think what you are doing is correct.
> The parameter types/values are for the ? binding parameters, you have
> specified everything explicitly .
> I also dont think you can return the RefCursor as the variable name , I
> believe this is only possible if the statement returns a ResultSet (in
> your
> case this is an OUT parameter)
> 
> 
> 
> On Fri, Sep 25, 2009 at 11:05 AM, rpaliath <ra...@hotmail.com>
> wrote:
> 
>>
>> Deepak, I have a ref cursor being returned. How do I declare that? I have
>> a
>> CSV file which is taking care of the 3 input variable neede
>> http://www.nabble.com/file/p25616563/jmeter.bmp jmeter.bmp d, but I am
>> confused about the ref cursor. The JDBC request is going out fine. Here
>> is
>> what I see on the "Request" tab of the Results tree
>>
>> call <schema>.<package>.GET_TRANSFER_BY_ID (52626820,0,0,P_TRANSFER_O)
>> But, it is returning a "Invalid Column Type" message.
>>
>> Rajiv
>>
>>
>> Deepak Shetty wrote:
>> >
>> >
>> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#JDBC_Request
>> >
>> > see Parameter Types (you'd say something like OUT INTEGER)
>> >
>> > If the callable statement has INOUT or OUT parameters, then these must
>> be
>> > indicated by prefixing the appropriate parameter types, e.g. instead of
>> > "INTEGER", use "INOUT INTEGER". If not specified, "IN" is assumed, i.e.
>> > "DATE" is the same as "IN DATE".
>> > If the type is not one of the fields found in java.sql.Types, versions
>> of
>> > JMeter after 2.3.2 also accept the corresponding integer number, e.g.
>> > since
>> > INTEGER == 4, you can use "INOUT 4".
>> > There must be as many types as there are placeholders in the statement.
>> >
>> > regards
>> > deepak
>> >
>> > On Fri, Sep 25, 2009 at 10:30 AM, rpaliath <ra...@hotmail.com>
>> > wrote:
>> >
>> >>
>> >> Jelmer
>> >> Can you tell me how you defined the out variables in the JDBC Request
>> >> screen?
>> >> Thanks.
>> >>
>> >>
>> >>
>> >> Jelmer de Haas wrote:
>> >> >
>> >> > I have managed to call the Stored Procedure (SP) on Oracle 10 from
>> >> > Jmeter.
>> >> >
>> >> > This SP (see below) returns three values. But in the Result Tree
>> these
>> >> > are not shown, only respons is 'Executed'.
>> >> >
>> >> > Is there some way to show these values and do some kind of response
>> >> > assertion on them?
>> >> >
>> >> >
>> >> > DECLARE
>> >> >
>> >> >   returnmessage VARCHAR(256);
>> >> >   ipaddress VARCHAR(256);
>> >> >   fnumber VARCHAR(256);
>> >> >   brand VARCHAR(256);
>> >> >   returncode NUMBER;
>> >> >   creationdate NUMBER;
>> >> >
>> >> > BEGIN
>> >> >
>> >> >   BLACKLISTIP ('test1@domain.com', '127.0.0.66', 'brand',
>> >> > returncode,returnmessage,creationdate);
>> >> >   DBMS_OUTPUT.PUT_LINE(returncode);
>> >> >   DBMS_OUTPUT.PUT_LINE(returnmessage);
>> >> >   DBMS_OUTPUT.PUT_LINE(creationdate);
>> >> >
>> >> > END;
>> >> >
>> >> >
>> >> > Regards,
>> >> > Jelmer
>> >> >
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Return-values-on-Stored-Procedure-tp6429881p25615942.html
>> >> Sent from the JMeter - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> >> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Return-values-on-Stored-Procedure-tp6429881p25616563.html
>> Sent from the JMeter - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Return-values-on-Stored-Procedure-tp6429881p25648999.html
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Return values on Stored Procedure

Posted by Deepak Shetty <sh...@gmail.com>.
looking at your screen , I dont think what you are doing is correct.
The parameter types/values are for the ? binding parameters, you have
specified everything explicitly .
I also dont think you can return the RefCursor as the variable name , I
believe this is only possible if the statement returns a ResultSet (in your
case this is an OUT parameter)



On Fri, Sep 25, 2009 at 11:05 AM, rpaliath <ra...@hotmail.com> wrote:

>
> Deepak, I have a ref cursor being returned. How do I declare that? I have a
> CSV file which is taking care of the 3 input variable neede
> http://www.nabble.com/file/p25616563/jmeter.bmp jmeter.bmp d, but I am
> confused about the ref cursor. The JDBC request is going out fine. Here is
> what I see on the "Request" tab of the Results tree
>
> call <schema>.<package>.GET_TRANSFER_BY_ID (52626820,0,0,P_TRANSFER_O)
> But, it is returning a "Invalid Column Type" message.
>
> Rajiv
>
>
> Deepak Shetty wrote:
> >
> >
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#JDBC_Request
> >
> > see Parameter Types (you'd say something like OUT INTEGER)
> >
> > If the callable statement has INOUT or OUT parameters, then these must be
> > indicated by prefixing the appropriate parameter types, e.g. instead of
> > "INTEGER", use "INOUT INTEGER". If not specified, "IN" is assumed, i.e.
> > "DATE" is the same as "IN DATE".
> > If the type is not one of the fields found in java.sql.Types, versions of
> > JMeter after 2.3.2 also accept the corresponding integer number, e.g.
> > since
> > INTEGER == 4, you can use "INOUT 4".
> > There must be as many types as there are placeholders in the statement.
> >
> > regards
> > deepak
> >
> > On Fri, Sep 25, 2009 at 10:30 AM, rpaliath <ra...@hotmail.com>
> > wrote:
> >
> >>
> >> Jelmer
> >> Can you tell me how you defined the out variables in the JDBC Request
> >> screen?
> >> Thanks.
> >>
> >>
> >>
> >> Jelmer de Haas wrote:
> >> >
> >> > I have managed to call the Stored Procedure (SP) on Oracle 10 from
> >> > Jmeter.
> >> >
> >> > This SP (see below) returns three values. But in the Result Tree these
> >> > are not shown, only respons is 'Executed'.
> >> >
> >> > Is there some way to show these values and do some kind of response
> >> > assertion on them?
> >> >
> >> >
> >> > DECLARE
> >> >
> >> >   returnmessage VARCHAR(256);
> >> >   ipaddress VARCHAR(256);
> >> >   fnumber VARCHAR(256);
> >> >   brand VARCHAR(256);
> >> >   returncode NUMBER;
> >> >   creationdate NUMBER;
> >> >
> >> > BEGIN
> >> >
> >> >   BLACKLISTIP ('test1@domain.com', '127.0.0.66', 'brand',
> >> > returncode,returnmessage,creationdate);
> >> >   DBMS_OUTPUT.PUT_LINE(returncode);
> >> >   DBMS_OUTPUT.PUT_LINE(returnmessage);
> >> >   DBMS_OUTPUT.PUT_LINE(creationdate);
> >> >
> >> > END;
> >> >
> >> >
> >> > Regards,
> >> > Jelmer
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Return-values-on-Stored-Procedure-tp6429881p25615942.html
> >> Sent from the JMeter - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Return-values-on-Stored-Procedure-tp6429881p25616563.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: Return values on Stored Procedure

Posted by Deepak Shetty <sh...@gmail.com>.
i think you need to find the Integer value of OracleTypes.CURSOR (write a
simple java program that prints out this value) and then use OUT <INTVALUE>

regards
deepak

On Fri, Sep 25, 2009 at 11:05 AM, rpaliath <ra...@hotmail.com> wrote:

>
> Deepak, I have a ref cursor being returned. How do I declare that? I have a
> CSV file which is taking care of the 3 input variable neede
> http://www.nabble.com/file/p25616563/jmeter.bmp jmeter.bmp d, but I am
> confused about the ref cursor. The JDBC request is going out fine. Here is
> what I see on the "Request" tab of the Results tree
>
> call <schema>.<package>.GET_TRANSFER_BY_ID (52626820,0,0,P_TRANSFER_O)
> But, it is returning a "Invalid Column Type" message.
>
> Rajiv
>
>
> Deepak Shetty wrote:
> >
> >
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#JDBC_Request
> >
> > see Parameter Types (you'd say something like OUT INTEGER)
> >
> > If the callable statement has INOUT or OUT parameters, then these must be
> > indicated by prefixing the appropriate parameter types, e.g. instead of
> > "INTEGER", use "INOUT INTEGER". If not specified, "IN" is assumed, i.e.
> > "DATE" is the same as "IN DATE".
> > If the type is not one of the fields found in java.sql.Types, versions of
> > JMeter after 2.3.2 also accept the corresponding integer number, e.g.
> > since
> > INTEGER == 4, you can use "INOUT 4".
> > There must be as many types as there are placeholders in the statement.
> >
> > regards
> > deepak
> >
> > On Fri, Sep 25, 2009 at 10:30 AM, rpaliath <ra...@hotmail.com>
> > wrote:
> >
> >>
> >> Jelmer
> >> Can you tell me how you defined the out variables in the JDBC Request
> >> screen?
> >> Thanks.
> >>
> >>
> >>
> >> Jelmer de Haas wrote:
> >> >
> >> > I have managed to call the Stored Procedure (SP) on Oracle 10 from
> >> > Jmeter.
> >> >
> >> > This SP (see below) returns three values. But in the Result Tree these
> >> > are not shown, only respons is 'Executed'.
> >> >
> >> > Is there some way to show these values and do some kind of response
> >> > assertion on them?
> >> >
> >> >
> >> > DECLARE
> >> >
> >> >   returnmessage VARCHAR(256);
> >> >   ipaddress VARCHAR(256);
> >> >   fnumber VARCHAR(256);
> >> >   brand VARCHAR(256);
> >> >   returncode NUMBER;
> >> >   creationdate NUMBER;
> >> >
> >> > BEGIN
> >> >
> >> >   BLACKLISTIP ('test1@domain.com', '127.0.0.66', 'brand',
> >> > returncode,returnmessage,creationdate);
> >> >   DBMS_OUTPUT.PUT_LINE(returncode);
> >> >   DBMS_OUTPUT.PUT_LINE(returnmessage);
> >> >   DBMS_OUTPUT.PUT_LINE(creationdate);
> >> >
> >> > END;
> >> >
> >> >
> >> > Regards,
> >> > Jelmer
> >> >
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Return-values-on-Stored-Procedure-tp6429881p25615942.html
> >> Sent from the JMeter - User mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Return-values-on-Stored-Procedure-tp6429881p25616563.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: Return values on Stored Procedure

Posted by rpaliath <ra...@hotmail.com>.
Deepak, I have a ref cursor being returned. How do I declare that? I have a
CSV file which is taking care of the 3 input variable neede
http://www.nabble.com/file/p25616563/jmeter.bmp jmeter.bmp d, but I am
confused about the ref cursor. The JDBC request is going out fine. Here is
what I see on the "Request" tab of the Results tree

call <schema>.<package>.GET_TRANSFER_BY_ID (52626820,0,0,P_TRANSFER_O)
But, it is returning a "Invalid Column Type" message.

Rajiv


Deepak Shetty wrote:
> 
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#JDBC_Request
> 
> see Parameter Types (you'd say something like OUT INTEGER)
> 
> If the callable statement has INOUT or OUT parameters, then these must be
> indicated by prefixing the appropriate parameter types, e.g. instead of
> "INTEGER", use "INOUT INTEGER". If not specified, "IN" is assumed, i.e.
> "DATE" is the same as "IN DATE".
> If the type is not one of the fields found in java.sql.Types, versions of
> JMeter after 2.3.2 also accept the corresponding integer number, e.g.
> since
> INTEGER == 4, you can use "INOUT 4".
> There must be as many types as there are placeholders in the statement.
> 
> regards
> deepak
> 
> On Fri, Sep 25, 2009 at 10:30 AM, rpaliath <ra...@hotmail.com>
> wrote:
> 
>>
>> Jelmer
>> Can you tell me how you defined the out variables in the JDBC Request
>> screen?
>> Thanks.
>>
>>
>>
>> Jelmer de Haas wrote:
>> >
>> > I have managed to call the Stored Procedure (SP) on Oracle 10 from
>> > Jmeter.
>> >
>> > This SP (see below) returns three values. But in the Result Tree these
>> > are not shown, only respons is 'Executed'.
>> >
>> > Is there some way to show these values and do some kind of response
>> > assertion on them?
>> >
>> >
>> > DECLARE
>> >
>> >   returnmessage VARCHAR(256);
>> >   ipaddress VARCHAR(256);
>> >   fnumber VARCHAR(256);
>> >   brand VARCHAR(256);
>> >   returncode NUMBER;
>> >   creationdate NUMBER;
>> >
>> > BEGIN
>> >
>> >   BLACKLISTIP ('test1@domain.com', '127.0.0.66', 'brand',
>> > returncode,returnmessage,creationdate);
>> >   DBMS_OUTPUT.PUT_LINE(returncode);
>> >   DBMS_OUTPUT.PUT_LINE(returnmessage);
>> >   DBMS_OUTPUT.PUT_LINE(creationdate);
>> >
>> > END;
>> >
>> >
>> > Regards,
>> > Jelmer
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Return-values-on-Stored-Procedure-tp6429881p25615942.html
>> Sent from the JMeter - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Return-values-on-Stored-Procedure-tp6429881p25616563.html
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Return values on Stored Procedure

Posted by Deepak Shetty <sh...@gmail.com>.
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#JDBC_Request

see Parameter Types (you'd say something like OUT INTEGER)

If the callable statement has INOUT or OUT parameters, then these must be
indicated by prefixing the appropriate parameter types, e.g. instead of
"INTEGER", use "INOUT INTEGER". If not specified, "IN" is assumed, i.e.
"DATE" is the same as "IN DATE".
If the type is not one of the fields found in java.sql.Types, versions of
JMeter after 2.3.2 also accept the corresponding integer number, e.g. since
INTEGER == 4, you can use "INOUT 4".
There must be as many types as there are placeholders in the statement.

regards
deepak

On Fri, Sep 25, 2009 at 10:30 AM, rpaliath <ra...@hotmail.com> wrote:

>
> Jelmer
> Can you tell me how you defined the out variables in the JDBC Request
> screen?
> Thanks.
>
>
>
> Jelmer de Haas wrote:
> >
> > I have managed to call the Stored Procedure (SP) on Oracle 10 from
> > Jmeter.
> >
> > This SP (see below) returns three values. But in the Result Tree these
> > are not shown, only respons is 'Executed'.
> >
> > Is there some way to show these values and do some kind of response
> > assertion on them?
> >
> >
> > DECLARE
> >
> >   returnmessage VARCHAR(256);
> >   ipaddress VARCHAR(256);
> >   fnumber VARCHAR(256);
> >   brand VARCHAR(256);
> >   returncode NUMBER;
> >   creationdate NUMBER;
> >
> > BEGIN
> >
> >   BLACKLISTIP ('test1@domain.com', '127.0.0.66', 'brand',
> > returncode,returnmessage,creationdate);
> >   DBMS_OUTPUT.PUT_LINE(returncode);
> >   DBMS_OUTPUT.PUT_LINE(returnmessage);
> >   DBMS_OUTPUT.PUT_LINE(creationdate);
> >
> > END;
> >
> >
> > Regards,
> > Jelmer
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Return-values-on-Stored-Procedure-tp6429881p25615942.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: Return values on Stored Procedure

Posted by rpaliath <ra...@hotmail.com>.
Jelmer
Can you tell me how you defined the out variables in the JDBC Request
screen?
Thanks.



Jelmer de Haas wrote:
> 
> I have managed to call the Stored Procedure (SP) on Oracle 10 from
> Jmeter. 
> 
> This SP (see below) returns three values. But in the Result Tree these
> are not shown, only respons is 'Executed'. 
> 
> Is there some way to show these values and do some kind of response
> assertion on them? 
> 
> 
> DECLARE
>   
>   returnmessage VARCHAR(256);
>   ipaddress VARCHAR(256);
>   fnumber VARCHAR(256);
>   brand VARCHAR(256);
>   returncode NUMBER;
>   creationdate NUMBER;
> 
> BEGIN
>  
>   BLACKLISTIP ('test1@domain.com', '127.0.0.66', 'brand',
> returncode,returnmessage,creationdate);
>   DBMS_OUTPUT.PUT_LINE(returncode);
>   DBMS_OUTPUT.PUT_LINE(returnmessage);
>   DBMS_OUTPUT.PUT_LINE(creationdate);
> 
> END;
> 
> 
> Regards,
> Jelmer
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Return-values-on-Stored-Procedure-tp6429881p25615942.html
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org