Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to tell how long an instance has been running
> In Oracle 8 and above you can use the V$INSTANCE view to determine startup
> time. However, in earlier versions of Oracle the "STARTUP_TIME" column did
> not exist in V$INSTANCE. The easiest way to determine the startup time of
> the instance is to grab the earliest logon time from the V$SESSION view.
In Oracle 7, you can still use V$INSTANCE to determine startup time. And it's much more accurate than grabbing the earliest logon time from V$SESSION. They did change this in Oracle 8 and it is much easier in 8+, but you can still get the information from V$INSTANCE in Oracle 7 (I'm not sure about 6 and earlier). Try this query to find out what date/time your database started for an Oracle 7 database:
select to_char(dat+offset,'MM/DD/YY HH24:MI:SS') from (select to_date(value,'J') as dat
from v$instance where key='STARTUP TIME - JULIAN'), (select value/(24*60*60) as offset from v$instance where key='STARTUP TIME - SECONDS');
Now you will know *exactly* what time your Oracle 7 database started.
HTH,
Brian
Received on Fri Jun 22 2001 - 08:10:07 CDT