mgalison

Trying to Create Custom Monitor when SQL returns no rows - Probe Oracle Monitoring

Discussion created by mgalison on Jan 25, 2013
Latest reply on Jan 27, 2013 by RobPol

I am trying to run the following SQL

 

Select  count(*),  username, osuser, sid, serial#, status, last_call_et
from v$session
where status not in ('ACTIVE', 'INACTIVE')
and last_call_et > 5000
group by username, osuser, sid, serial#, status, last_call_et

 

 

When the result sets of this returns a value, I can save the SQL in the TEMPLETE and create the Monitor. But when the result set "Returns No Rows", I am unable to save the query in the templete. I have always managed by using count(*) being 0 or greater than 0, until now.

 

 

My question, How do any of you save the custom  Query in the Templete and propragate the monitoring accross all Databases if there are no Resut Sets from the Query is returning no rows "NULL" .

 

In the above query, one of my databases has a condition of a status other than "ACTIVE/INACTIVE". But the rest of my Databases only have those 2 values then unable to save the query.

Outcomes