Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Server up time

Re: Server up time

From: <sunk_at_focushope.edu>
Date: Wed, 11 Aug 1999 16:29:13 GMT
Message-ID: <7os8ca$etj$1@nnrp1.deja.com>


In article <37B1839D.5F5C46DB_at_vertis.nl>,   Frans Trip <tripf_at_vertis.nl> wrote:
> Hi There,
>
> I need to supply information about the Oracle database up-time.
> Where can i find this info in the database ?
>
> I need to present info about the availability of Oracle !!!
>
> Please mail your info to:
>
> tripf_at_vertis.nl
>
>

Problem Description:


You asked how to find out when an instance was started without having to look
in the very large alertSID.log?

Search Words:


v$instance
sgadefSID.dbf
started
startup time JULIAN

+==+

Diagnostics and References:

2. Soln# 2106281.6 QUERY V$INSTANCE -OR- SEE SGADEFSID.DBF FILE IN ?/DBS D

Solution ID         : 2106281.6
For Problem         : 1060421.6
Affected Platforms  : Digital Alpha OpenVMS
Affected Products   : Oracle Server - Enterprise Edition V7
Affected Components : RDBMS V07.01.05.02.03
                      RDBMS V08.XX
Affected Oracle Vsn : V07.01.05.02.03
                      V08.XX

Summary:
QUERY V$INSTANCE -OR- SEE SGADEFSID.DBF FILE IN ?/DBS DIRECTORY +=+

Solution Description:


You can find out when the instance was started by querying v$instance or looking for the sgadefSID.dbf file located in ?/dbs directory.

Oracle 7

In Oracle7, you can look in v$instance. You will see the value STARTUP TIME -
JULIAN under the column KEY.

You will need to convert this number to a mmddyy format by issuing the following command:

   select to_char(to_date(n, 'J'), 'MM-DD-YY:HH:MM:SS') from dual;

   N is the number under the VALUE column for STARTUP TIME - JULIAN.

Oracle 8

In Oracle8, the v$instance view has been revamped. There is a column called
STARTUP_TIME. No conversion is needed.

You can also find the sgadefSID.dbf file in the ?/dbs directory. This file is
created when the database is started.

Solution Explanation:


Oracle7:

   SQL> select * from v$instance;

   KEY                       VALUE
   ------------------------- -----
   RESTRICTED MODE           0
   SHUTDOWN PENDING          0
   STARTUP TIME - JULIAN     2451112

   STARTUP TIME - SECONDS 35378    SQL> select to_char(to_date(2451112, 'J'), 'MM-DD-YY:HH:MM:SS') from dual;

   TO_CHAR(TO_DATE(2



   10-25-98:12:10:00

   SQL> select startup_time from v$instance;

   STARTUP_T



   25-OCT-98    -rw-r----- 1 oracle dba 736 Oct 25 09:49 sgadefV734.dbf

Solution References:


Oracle7 Server Reference Manual

Oracle8 Server Reference Manual

+==+

References:

Thanks,

Kurt Sun, OCP

Programmer Analyst
Focus:HOPE Information Systems



Direct: 313/494-4520
Fax: 313/494-4290
Pager: 313/752-0837
E-Mail: sunk_at_focushope.edu

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Wed Aug 11 1999 - 11:29:13 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US