Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Database up longer that host?
I use a script named db_uptime.sql (I think I got it from the list here)
to calculate how long the database has been up. The output compares
nicely to the unix uptime command.
We had some maintenance last Wed night that bounced the host (Tru64 5.1a cluster) and naturally the database as well. But when I looked at the host uptime compared to the db_uptime.sql, it looks like the database has been up longer than the host. The db is 8.1.7.3. The host is a Tru64 Compaq (er HP) GS160 AlphaWildfire machine. We are in a cluster, but the databases are all still running on one node.
1* select STARTUP_TIME from v$instance
SQL> /
27-NOV-2002 18:30:12
SQL> @db_uptime
Database Uptime
SQL> !uptime
15:40 up 4 days, 14:52, 7 users, load average: 4.13, 6.93, 7.08
SQL> select sysdate from dual;
SYSDATE
Stephen Andert
(confused in AZ)
||round(((xx-floor(xx)*24)-floor((xx-floor(xx)*24)))*60)
||'minutes'
select host_name,instance_name ,(sysdate-STARTUP_TIME) xx from v$instance )
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Stephen Andert INET: stephenandert_at_firsthealth.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Mon Dec 02 2002 - 15:33:56 CST
![]() |
![]() |