Logo

SQL Script

Database Uptime

Tested on Oracle 7

Updated : 06-June-2000
Version : 1.0

Description

Simple Script to display the database uptime i.e. How long the database has been running.

Parameters

None

SQL Source

col stime form a20 Heading "Database Started At"

select to_char(to_date(i1.value||' '||i2.value,'J SSSSS')
         ,'DD-MON-YYYY HH24:MI:SS') stime
from v$instance i1, v$instance i2
where i1.key='STARTUP TIME - JULIAN'
and i2.key='STARTUP TIME - SECONDS';

Return to Index of SQL Scripts


Home | Company Profile | Services | Contact Us | SQL scripts and tips | Quiz
Legal

Logo