Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Can I get oracle SID, Startup Time, Version at oracle 7.3.4 with query
On Mon, 4 Mar 2002 21:33:35 -0500, "David Van Zandt" <dvanzandt_at_iquest.net> wrote:
>Posting the SQL statement would be a nice start....
>
>
>"yinggull" <yinggull_at_hanmir.com> wrote in message
>news:a5v76v$oa$1_at_news.nuri.net...
>> I did it at oracle 8.1.7
>>
>>
>> But the query doen't works at oracle 7.3.4
>>
>> How can I do it?
>>
>> Help please....
>>
>> Have a nice day everyone.
>>
>> Bob, Hur.
>>
>> yinggull_at_hanmir.com
>>
>>
>>
>
SET COLSEP " "
SET LINESIZE 1000
set pagesize 150
COLUMN DB_NAME FORMAT A7
SELECT B.NAME AS DB_NAME, STATUS, CREATED,
TO_CHAR(STARTUP_TIME, 'MM/DD/YYYY HH:MI:SS') " Start Date @ Time",
TO_CHAR(SYSDATE, 'MM/DD/YYYY HH:MI:SS') "Current System Time",
substr(trunc(SYSDATE-(STARTUP_TIME) ) || ' Day(s), ' ||
trunc(24*((SYSDATE-STARTUP_TIME) - trunc(SYSDATE-STARTUP_TIME)))||' Hour(s), ' ||
mod(trunc(1440*((SYSDATE-STARTUP_TIME) - trunc(SYSDATE-STARTUP_TIME))), 60) ||' M ' ,1,35)
" Total Time Up"
from sys.v_$instance a, V$database B
/
SET COLSEP " "
SET LINESIZE 80
Gives you these ...
DB_NAME STATUS CREATED Start Date @ Time Current System Time Total Time Up
Received on Tue Mar 05 2002 - 05:55:10 CST
![]() |
![]() |