Enterprise Manager Generic (MOSC)

MOSC Banner

OEM Query

edited Oct 5, 2018 12:30PM in Enterprise Manager Generic (MOSC) 6 commentsAnswered ✓
Hi..

I am working on a query to display the last 30 days of uptime for our databases.  This is the query:

select availability_status, target_name, target_type, end_time - start_time from (select availability_status, target_name, target_type,
nvl(end_timestamp, sysdate) end_time,
case when start_timestamp < sysdate -31 then sysdate -31
else start_timestamp end start_time
from MGMT$AVAILABILITY_HISTORY
where nvl(end_timestamp, sysdate) > sysdate -31
and target_name ='FSPERF11')

I get the results below:

AVAILABILITY_STATUS TARGET_NAMETARGET_TYPEEND_TIME-START_TIME
Agent DownFSPERF11oracle_database0.006
Target DownFSPERF11

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