Solved

Oracle database up time

Posted on 2002-07-24
5
567 Views
Last Modified: 2010-08-05
Is there a way to figure out Oracle 8.1.7 database instance up time?
0
Comment
Question by:kishoremajji
5 Comments
 
LVL 2

Expert Comment

by:LeeMiller
Comment Utility
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
 
LVL 34

Accepted Solution

by:
Mark Geerlings earned 25 total points
Comment Utility
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
 
LVL 1

Assisted Solution

by:Ammar
Ammar earned 25 total points
Comment Utility
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
 

Expert Comment

by:modulo
Comment Utility
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
 
LVL 3

Expert Comment

by:patelgokul
Comment Utility
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows how to recover a database from a user managed backup
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now