Stephen,

If I was in your position I would go and explain to your boss that your
"mad DBA skillz" have resulted in a database that has better uptime than
it's physical host even, and discuss a pay rise!  Fixing the script will
probably return your status to "mere mortal DBA".



                                                                                       
                             
                    Meg Crocker                                                        
                             
                    <crocker@monste       To:     Multiple recipients of list ORACLE-L 
<[EMAIL PROTECTED]>       
                    rtrak.com>            cc:                                          
                             
                    Sent by:              Subject:     Re: Database up longer that 
host?                            
                    [EMAIL PROTECTED]                                                    
                             
                    m                                                                  
                             
                                                                                       
                             
                                                                                       
                             
                    03/12/2002                                                         
                             
                    12:33                                                              
                             
                    Please respond                                                     
                             
                    to ORACLE-L                                                        
                             
                                                                                       
                             
                                                                                       
                             





On Mon, 2 Dec 2002, Stephane Faroult wrote:

> Stephen Andert wrote:
> >
> > 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.
>
>    I hope that the query doesn't come from the list, because it is
> wrong. The error is to apply floor() before multiplying by 24 or 60 -
> you have tremendous rounding errors.
> My own database has not been up long enough to be 100% sure about it but
> I believe the following to be correct :

Hi:

    Neither of the scripts works for me.  Try this?

select
    'Host Name : '||host_name|| chr(10)||
    'Instance Name : '||instance_name|| chr(10)||
    'Uptime : '     ||floor(xx)||'days '
                    || floor( 24 * (xx - floor(xx)) ) || 'hours '
                    || round( 60 * (24 * xx - floor(24 * xx))) || 'minutes
'
    from (
             select host_name,instance_name ,(sysdate-STARTUP_TIME) xx
             from v$instance
         )
/


Meg Crocker
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Meg Crocker
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).




<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<---->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
   Privileged/Confidential information may be contained in this message.
          If you are not the addressee indicated in this message
       (or responsible for delivery of the message to such person),
            you may not copy or deliver this message to anyone.
In such case, you should destroy this message and kindly notify the sender
           by reply e-mail or by telephone on (61 3) 9612-6999.
   Please advise immediately if you or your employer does not consent to
                Internet e-mail for messages of this kind.
        Opinions, conclusions and other information in this message
              that do not relate to the official business of
                         Transurban City Link Ltd
         shall be understood as neither given nor endorsed by it.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<---->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Mark Richard
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).

Reply via email to