Managing Databases using Enterprise Manager (MOSC)

MOSC Banner

What is a recommend way to write a UDM to test if a value has changed since the last run ?


A SQL based User Defined Metric


SELECT COUNT (*) FROM TAB where badvalue=TRUE and badrowtimestamp is greater than time of last run


My question is that unless I store myself the value of the time of last run in a table there is no parameter I can use for this, the poor alternative is to set it for example to 15 minutes and then use (since 15 minutes previous) . This ties the query badly back to the frequency and is not preferred.


What is a recommended way of doing this ? Do I need to store last check time and do a pl/sql block instead ?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center