RE: Simple (?) PL/SQL help

From: Dimensional DBA <dimensional.dba_at_comcast.net>
Date: Wed, 22 Jun 2016 13:16:48 -0700
Message-ID: <010901d1ccc3$07553a10$15ffae30$_at_comcast.net>



Nagios has the capability of executing procs in the database and returning results to alarm based on.

The Nagios websites have a variety of examples you can download for free.      

Matthew Parker

Chief Technologist

Dimensional DBA

425-891-7934 (cell)

D&B 047931344

CAGE 7J5S7
<mailto:Dimensional.dba_at_comcast.net> Dimensional.dba_at_comcast.net

<http://www.linkedin.com/pub/matthew-parker/6/51b/944/> View Matthew Parker's profile on LinkedIn

<http://www.dimensionaldba.com/> www.dimensionaldba.com
 

From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Ingrid Voigt Sent: Wednesday, June 22, 2016 1:09 PM
To: oracle-l_at_freelists.org
Subject: Simple (?) PL/SQL help  

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

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Jun 22 2016 - 22:16:48 CEST

Original text of this message