Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Elapsed Time

RE: Elapsed Time

From: <oracle-l-bounce_at_freelists.org>
Date: Fri, 19 May 2006 19:47:51 -0400
Message-ID: <4001DEAF7DF9BD498B58B45051FBEA65037351DB@25exch1.vicorpower.vicr.com>


Thanks all, Thomas's function with a little tweaking has done the job very nicely.

-----Original Message-----
From: Tim Fleury [mailto:Tim_Fleury_at_perlegen.com] Sent: Friday, May 19, 2006 5:42 PM
To: gorbyx_at_gmail.com; rjamya_at_gmail.com
Cc: Thomas.Mercadante_at_labor.state.ny.us; Goulet, Dick; _oracle_L_list Subject: RE: Elapsed Time

I use this to show the length of a lock being held. It's good for locks less than 24 hours.

select name, l.owner "owner", osuser, session_id, machine, process,

        CEIL(MOD(FLOOR(last_convert/3600),24)) "LockHH",
        CEIL(MOD(FLOOR(last_convert/60),60))   "LockMM",
        CEIL(MOD(last_convert,60))             "LockSS"
   from dba_dml_locks l, v$session s
where l.session_id = s.sid
  and name not like '%PLAN_TABLE%'
  and l.session_id <> 99999
order by name

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Alex Gorbachev Sent: Friday, May 19, 2006 2:30 PM
To: rjamya_at_gmail.com
Cc: Thomas.Mercadante_at_labor.state.ny.us; DGoulet_at_vicr.com; _oracle_L_list
Subject: Re: Elapsed Time

Well, not realy coz instead of sysdate there is number of seconds.

2006/5/19, rjamya <rjamya_at_gmail.com>:
> select to_char(sysdate,'hh24') || ' hours ' || to_char(sysdate,'mi')
> || ' minutes ' || to_char(sysdate,'ss') || ' seconds ' from dual
> /
>
> something like this won't work???
> Raj
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>

-- 
Best regards,
Alex Gorbachev

http://oracloid.blogspot.com
--
http://www.freelists.org/webpage/oracle-l



--
http://www.freelists.org/webpage/oracle-l
Received on Fri May 19 2006 - 18:47:51 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US