select 'Hostname : ' || host_name "HOST NAME"
,'Instance Name : ' || instance_name "INSTANCE NAME"
,'Started At : ' || to_char(startup_time,'DD-MON-YYYY HH24:MI:SS') "STARTED TIME"
,'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) ' ||
mod(trunc(86400*((sysdate-startup_time) -
trunc(sysdate-startup_time))), 60) ||' seconds' uptime
from v$instance
,'Instance Name : ' || instance_name "INSTANCE NAME"
,'Started At : ' || to_char(startup_time,'DD-MON-YYYY HH24:MI:SS') "STARTED TIME"
,'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) ' ||
mod(trunc(86400*((sysdate-startup_time) -
trunc(sysdate-startup_time))), 60) ||' seconds' uptime
from v$instance
No comments:
Post a Comment