Re: Simple (?) PL/SQL help

  • From: Howard Latham <howard.latham@xxxxxxxxx>
  • To: "giantpanda@xxxxxxx" <giantpanda@xxxxxxx>
  • Date: Wed, 22 Jun 2016 21:14:07 +0100

dont know but maybe you could put a trigger that does your performance test
on a table and run it on select.

On 22 June 2016 at 21:08, Ingrid Voigt <giantpanda@xxxxxxx> wrote:

Hi,

is there a trick that will let one run a DML procedure inside a SELECT
query?

The idea is to run a simple performance check from our nagios-based
central monitoring
tool, and the plugin does not speak anything other than "select a single
value from
somewhere".

I can schedule the DML within the database and let nagios pick up the
result
but would also like the nagios to be able to run it on demand.

So I would have to set up a select that calls a function that calls a
procedure.
The procedure does Insert-Update-Delete, returns its runtime to the
function
(or writes into a table or wherever I want), and the select gets it from
there.
The problem is, I don't get any return values.

(Oracle version is 11.2.0.4 or 12.1.0.2)

create or replace function getruntime
return number
IS
  dmlruntime number(8);
begin
  dmltest(dmlruntime);
  return dmlruntime;
end getruntime;
/

select getruntime from dual;
The value is always null.

Am I overlooking something simple here? Any help would be greatly
appreciated.


Thanks
Ingrid
-- //www.freelists.org/webpage/oracle-l




-- 
Howard A. Latham

Other related posts: