• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 596
  • Last Modified:

Oracle database up time

Is there a way to figure out Oracle 8.1.7 database instance up time?
0
kishoremajji
Asked:
kishoremajji
2 Solutions
 
LeeMillerCommented:
select floor(sysdate - startup_time) || ' days(s) ' ||
       trunc( 24*((sysdate-startup_time) -
       trunc(sysdate-startup_time))) || ' hour(s) ' ||
       mod(trunc(1440*((sysdate-startup_time) -
       trunc(sysdate-startup_time))), 60) ||' minute(s) ' ||
       mod(trunc(86400*((sysdate-startup_time) -
       trunc(sysdate-startup_time))), 60) ||' seconds' uptime
from v$instance
0
 
Mark GeerlingsDatabase AdministratorCommented:
Here's a simpler approach to get the answer in days:

column "Days" format 9999;
select name "DB name", log_mode,
to_char(startup_time,'Dy DD-Mon-YY fmHH:fmMI:SS am') "Started",
sysdate - startup_time "Days"
from v$database, v$instance;
0
 
AmmarCommented:
Hi,
 Try the below SQL select ..

select
to_char(LOGON_TIME,'Dy dd/mm/yyyy fmHH:fmMI:SS am')
from
v$session
where
SID = 1;


Thanx,
Ammar
0
 
moduloCommented:
Dear: Ammar

I've rejected your proposed answer as Experts Exchange holds an experiment to work without the answer button.

See:        http://www.experts-exchange.com/jsp/communityNews.jsp
Paragraph: Site Update for Wednesday, November 06, 2002

By this rejection the Asker will be notified by mail and hopefully he will take his responsibility to finalize the question or post an additional comment.
The Asker sees a button beside every post which says "Accept This Comment As Answer" (including rejected answers) -- so if he/she thinks yours is the best, you'll be awarded the points and the grade.

Thanks !

modulo

Community Support Moderator
Experts Exchange
0
 
patelgokulCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
split points between ammar and markgeer
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

patelgokul
EE Cleanup Volunteer
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now