<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Scripts to show how long Oracle database is up in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-to-show-how-long-oracle-database-is-up/m-p/2883409#M935210</link>
    <description>One other option is to use the "last_call_et" field from the v$session for the background processes.  This is in seconds, and you can modify the information in any way you want. &lt;BR /&gt;&lt;BR /&gt;Brian</description>
    <pubDate>Thu, 16 Jan 2003 19:27:44 GMT</pubDate>
    <dc:creator>Brian Crabtree</dc:creator>
    <dc:date>2003-01-16T19:27:44Z</dc:date>
    <item>
      <title>Scripts to show how long Oracle database is up</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-to-show-how-long-oracle-database-is-up/m-p/2883404#M935205</link>
      <description>Hi.&lt;BR /&gt;&lt;BR /&gt;I need to know how long my database is up. Has anybody got a script to show uptime for Oracle 7 and 8 databases.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;BR /&gt;&lt;BR /&gt;Dave</description>
      <pubDate>Thu, 16 Jan 2003 11:07:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripts-to-show-how-long-oracle-database-is-up/m-p/2883404#M935205</guid>
      <dc:creator>Dave Walley</dc:creator>
      <dc:date>2003-01-16T11:07:55Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts to show how long Oracle database is up</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-to-show-how-long-oracle-database-is-up/m-p/2883405#M935206</link>
      <description>hi dave,&lt;BR /&gt;&lt;BR /&gt;Run the following query:&lt;BR /&gt;&lt;BR /&gt;SQL&amp;gt; select to_char(STARTUP_TIME,'Dy dd Mon HH24:MI:SS') "DB Startup Time"&lt;BR /&gt;from v$instance&lt;BR /&gt;&lt;BR /&gt;DB Startup Time&lt;BR /&gt;-------------------&lt;BR /&gt;Mon 16 Dec 10:59:41&lt;BR /&gt;&lt;BR /&gt;SQL&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps!&lt;BR /&gt;Best Regards&lt;BR /&gt;Yogeeraj</description>
      <pubDate>Thu, 16 Jan 2003 11:20:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripts-to-show-how-long-oracle-database-is-up/m-p/2883405#M935206</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2003-01-16T11:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts to show how long Oracle database is up</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-to-show-how-long-oracle-database-is-up/m-p/2883406#M935207</link>
      <description>That shows me the start time what I need is a script that takes that time from the current time and reports the actual uptime.&lt;BR /&gt;&lt;BR /&gt;Dave</description>
      <pubDate>Thu, 16 Jan 2003 11:25:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripts-to-show-how-long-oracle-database-is-up/m-p/2883406#M935207</guid>
      <dc:creator>Dave Walley</dc:creator>
      <dc:date>2003-01-16T11:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts to show how long Oracle database is up</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-to-show-how-long-oracle-database-is-up/m-p/2883407#M935208</link>
      <description>hi again,&lt;BR /&gt;&lt;BR /&gt;in terms of days, you should:&lt;BR /&gt;&lt;BR /&gt;SQL&amp;gt; select sysdate - (select STARTUP_TIME from v$instance)&lt;BR /&gt;from dual&lt;BR /&gt;&lt;BR /&gt;SYSDATE-(SELECTSTARTUP_TIMEFROMV$INSTANCE)&lt;BR /&gt;------------------------------------------&lt;BR /&gt;                                31.1914236&lt;BR /&gt;&lt;BR /&gt;SQL&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Come on! play with it ;)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Best Regards&lt;BR /&gt;Yogeeraj</description>
      <pubDate>Thu, 16 Jan 2003 11:32:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripts-to-show-how-long-oracle-database-is-up/m-p/2883407#M935208</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2003-01-16T11:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts to show how long Oracle database is up</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-to-show-how-long-oracle-database-is-up/m-p/2883408#M935209</link>
      <description>Ok. ok.&lt;BR /&gt;Here it is! ;)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;select to_char( STARTUP_TIME, 'dd-mon-yyyy hh24:mi:ss' ), &lt;BR /&gt;       trunc( sysdate-STARTUP_TIME ) "Dy", &lt;BR /&gt;       trunc( mod( (sysdate-STARTUP_TIME)*24, 24 ) )  "Hr", &lt;BR /&gt;       trunc( mod( (sysdate-STARTUP_TIME)*24*60, 60 ) )  "Mi", &lt;BR /&gt; trunc( mod( to_char(sysdate,'SSSSS')-to_char(STARTUP_TIME,'SSSSS'), 60 ) ) "Sec", &lt;BR /&gt;       to_char( sysdate, 'dd-mon-yyyy hh24:mi:ss' ), &lt;BR /&gt;       sysdate-STARTUP_TIME "Tdy", &lt;BR /&gt;       (sysdate-STARTUP_TIME)*24 "Thr", &lt;BR /&gt;       (sysdate-STARTUP_TIME)*24*60 "Tmi", &lt;BR /&gt;       (sysdate-STARTUP_TIME)*24*60*60 "Tsec" &lt;BR /&gt;from v$instance;&lt;BR /&gt;&lt;BR /&gt;Dy gives you number of days between 2 dates (partial days discarded).  Tdy gives you total days including fractions (eg: you'll get 1.5 for 1 and 1/2 days).  Likewise for HR and THR and so on. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;E.g. when run on my Database&lt;BR /&gt;SQL&amp;gt; r&lt;BR /&gt;  1  select to_char( STARTUP_TIME, 'dd-mon-yyyy hh24:mi:ss' ),&lt;BR /&gt;  2         trunc( sysdate-STARTUP_TIME ) "Dy",&lt;BR /&gt;  3         trunc( mod( (sysdate-STARTUP_TIME)*24, 24 ) )  "Hr",&lt;BR /&gt;  4         trunc( mod( (sysdate-STARTUP_TIME)*24*60, 60 ) )  "Mi",&lt;BR /&gt;  5   trunc( mod( to_char(sysdate,'SSSSS')-to_char(STARTUP_TIME,'SSSSS'), 60 ) )&lt;BR /&gt; "Sec",&lt;BR /&gt;  6         to_char( sysdate, 'dd-mon-yyyy hh24:mi:ss' ),&lt;BR /&gt;  7         sysdate-STARTUP_TIME "Tdy",&lt;BR /&gt;  8         (sysdate-STARTUP_TIME)*24 "Thr",&lt;BR /&gt;  9         (sysdate-STARTUP_TIME)*24*60 "Tmi",&lt;BR /&gt; 10         (sysdate-STARTUP_TIME)*24*60*60 "Tsec"&lt;BR /&gt; 11* from v$instance&lt;BR /&gt;&lt;BR /&gt;TO_CHAR(STARTUP_TIME         Dy         Hr         Mi        Sec&lt;BR /&gt;-------------------- ---------- ---------- ---------- ----------&lt;BR /&gt;TO_CHAR(SYSDATE,'DD-        Tdy        Thr        Tmi       Tsec&lt;BR /&gt;-------------------- ---------- ---------- ---------- ----------&lt;BR /&gt;16-dec-2002 10:59:41         31          4         41         53&lt;BR /&gt;16-jan-2003 15:41:34 31.1957523 748.698056 44921.8833    2695313&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;SQL&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Hope you have your solution now!&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Yogeeraj</description>
      <pubDate>Thu, 16 Jan 2003 11:39:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripts-to-show-how-long-oracle-database-is-up/m-p/2883408#M935209</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2003-01-16T11:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: Scripts to show how long Oracle database is up</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripts-to-show-how-long-oracle-database-is-up/m-p/2883409#M935210</link>
      <description>One other option is to use the "last_call_et" field from the v$session for the background processes.  This is in seconds, and you can modify the information in any way you want. &lt;BR /&gt;&lt;BR /&gt;Brian</description>
      <pubDate>Thu, 16 Jan 2003 19:27:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripts-to-show-how-long-oracle-database-is-up/m-p/2883409#M935210</guid>
      <dc:creator>Brian Crabtree</dc:creator>
      <dc:date>2003-01-16T19:27:44Z</dc:date>
    </item>
  </channel>
</rss>

