Re: temporary space issue

From: Mladen Gogala <no_at_email.here.invalid>
Date: Tue, 8 Feb 2011 15:50:19 +0000 (UTC)
Message-ID: <pan.2011.02.08.15.50.19_at_email.here.invalid>



On Tue, 08 Feb 2011 06:16:32 -0800, dba cjb wrote:

> Is there a way I can get details of users/query/temp useage at time of
> crash so that I can say eg Mr x ran a select from tab which used 1.5gig
> & was trying to grab more space

select s.username,

       ss.sid,
       s.tablespace,
       round(sum(s.blocks*t.block_size)/1048576,2) MB
from v$sort_usage s,dba_tablespaces t,v$session ss where s.tablespace=t.tablespace_name
  and s.session_addr=ss.saddr
group by s.username,ss.sid, s.tablespace order by 4 desc
-- 
http://mgogala.byethost5.com
Received on Tue Feb 08 2011 - 09:50:19 CST

Original text of this message