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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: startup time v7

RE: startup time v7

From: Jacques Kilchoer <Jacques.Kilchoer_at_quest.com>
Date: Fri, 24 Aug 2001 11:45:04 -0700
Message-ID: <F001.00377401.20010824115725@fatcity.com>

-----Original Message-----

>From: Adams, Matthew (GEA, 088130) [mailto:MATT.ADAMS_at_APPL.GE.COM]
>
>The v$instance table has the following two entries in 
>Oracle7. 
>STARTUP TIME - Julian                  2452043 
>STARTUP TIME - SECONDS                   9476 
>Doing the obligitory RTFM, I find all it 
>says is that STARTUP TIME - Julian is the 
>startup date and time in Julian format.  
>(Thanks oracle, that's big help.) 
>What is the Julian calender? How do you translate this 
>number?


For translating number: look at the second query below.

column db_name format a10
column instance_name format a10
column global_name format a20
column host_os format a16
column version format a10
column current_time format a30
select
   a.name as db_name,
   rtrim (b.instance, chr (0)) as instance_name,
   c.global_name as global_name,
   substr (d.banner, 9, instr (d.banner, ':', 9) - 9) as host_os,
   e.value as version,
   to_char (sysdate, 'DAY, YYYY/MM/DD HH24:MI:SS') as current_time
from
   v$database a, v$thread b, global_name c,
   v$version d, v$parameter e

where
   d.banner (+) like 'TNS for %'
   and e.name (+) = 'compatible' ;

column host_name format a10
column logins format a10
column startup_time format a30
select
   b.machine as host_name,
   decode (c.value, 0, 'ALLOWED', 'RESTRICTED') as logins,
   to_char (to_date (d.value, 'J'), 'DAY, YYYY/MM/DD')
     || to_char (to_date (e.value, 'SSSSS'), ' HH24:MI:SS') as startup_time from
   v$bgprocess a, v$session b,
   v$instance c, v$instance d, v$instance e
where
   a.paddr = b.paddr
   and a.name like 'SMON%'
   and c.key = 'RESTRICTED MODE'
   and d.key = 'STARTUP TIME - JULIAN'
   and e.key = 'STARTUP TIME - SECONDS' ;

Jacques R. Kilchoër
x8816 Received on Fri Aug 24 2001 - 13:45:04 CDT

Original text of this message

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