Database Administration (MOSC)

MOSC Banner

Percentage Database Uptime

edited Oct 17, 2013 9:43AM in Database Administration (MOSC) 9 commentsAnswered
Dear Sir/Mam,
How would I compute the database up time in percentage for month and year. My goal is to create a report that would show the database uptime percentage. Please see the attached file. Can anyone help me to modify the following script?

select 
   'Hostname : ' || host_name
   ,'Instance Name : ' || instance_name
   ,'Started At : ' || to_char(startup_time,'DD-MON-YYYY HH24:MI:SS') stime
   ,'Uptime : ' || floor(sysdate - startup_time) || ' days(s) ' ||
   trunc( 24*((sysdate-startup_time) - 
   trunc(sysdate-startup_time))) || ' hour(s) ' ||
   mod(trunc(1440*((sysdate-startup_time) - 
   trunc(sysdate-startup_time))), 60) ||' minute(s) ' ||

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