Oracle Instance Startup Time
SET LINES 2000
SET PAGES 9999
COLUMN INSTANCE_NAME FOR A20
SELECT
instance_name,
to_char(startup_time, 'HH24:MI DD-MON-YY') "STARTUP TIME"
FROM
v$instance;
SET PAGES 9999
COLUMN INSTANCE_NAME FOR A20
SELECT
instance_name,
to_char(startup_time, 'HH24:MI DD-MON-YY') "STARTUP TIME"
FROM
v$instance;
Startup history timing of Oracle Instance
COL INSTANCE_NAME FOR A10
SELECT
instance_name,
to_char(startup_time, 'HH24:MI DD-MON-YY')
FROM
dba_hist_database_instance
ORDER BY
startup_time DESC;
SELECT
instance_name,
to_char(startup_time, 'HH24:MI DD-MON-YY')
FROM
dba_hist_database_instance
ORDER BY
startup_time DESC;
Uptime of Oracle Database
SET LINE 200
COLUMN HOSTNAME FOR A60
COLUMN INSTANCE_NAME FOR A60
COLUMN START_TIME FOR A60
COLUMN UP_TIME FOR A60
SELECT
'HOSTNAME : ' || host_name,
'INSTANCE NAME : ' || instance_name,
'STARTED AT : ' || to_char(startup_time, 'DD-MON-YYYY HH24:MI:SS') start_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' up_time
FROM
sys.v_$instance;
COLUMN HOSTNAME FOR A60
COLUMN INSTANCE_NAME FOR A60
COLUMN START_TIME FOR A60
COLUMN UP_TIME FOR A60
SELECT
'HOSTNAME : ' || host_name,
'INSTANCE NAME : ' || instance_name,
'STARTED AT : ' || to_char(startup_time, 'DD-MON-YYYY HH24:MI:SS') start_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' up_time
FROM
sys.v_$instance;