RE: RE: how to find out how much temp space a session is using?

  • From: "Mohan, Ross" <RMohan@xxxxxxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Thu, 13 May 2004 14:56:02 -0400

Not pretty, not polished, not copyrighted, not a problem:
####################################################
col tablespace for a10
col machine for a20
col username for a10
col osuser for a15
col terminal for a10
col sid for 9999
col spid for 9999

select a.tablespace,a.contents,a.extents,a.blocks,b.username,b.osuser,
b.MACHINE, b.terminal, c.spid, b.sid, sysdate
from v$sort_usage a, v$session b, v$process c
where a.session_addr = b.saddr
and c.addr = b.paddr
order by extents desc
/
####################################################
set pages 500
break on thesid nodup on username nodup 
col sql_text for a100 head "SQL Statement"
col username for a9 tru head "User"
col tablespace for a14 tru 
col thesid for 999 head "SID"

select x.thesid,x.username,x.tablespace, s.sql_text from v$sqlarea s,
(select
b.sql_hash_value,b.sql_address,   --modification
a.tablespace,a.contents,a.extents,a.blocks,b.username,b.osuser,
b.MACHINE, b.terminal, c.spid, b.sid thesid, sysdate
from v$sort_usage a, v$session b, v$process c
where a.session_addr = b.saddr
and c.addr = b.paddr
order by extents desc) x
where s.hash_value=x.sql_hash_value
and s.address=x.sql_address
order by 1,2
/
####################################################


HTH, 

~Ross


-----Original Message-----
From: Michael Thomas [mailto:mhthomas@xxxxxxxxx] 
Sent: Thursday, May 13, 2004 2:07 PM
To: oracle-l@xxxxxxxxxxxxx
Subject: Re: RE: how to find out how much temp space a session is using?


Migration guide, depricated in 9.2, ...

http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96530/changes.
htm#639263

<quote>
Dynamic Performance Views Deprecated in Release 9.2

The following dynamic performance views were
deprecated in release 9.2:
Deprecated      In Favor Of

GV$SORT_USAGE
        

GV$TEMPSEG_USAGE

V$SORT_USAGE
        

V$TEMPSEG_USAGE
</end quote>

You are correct on the new one. 

Regards,

Mike Thomas

--- ryan.gaffuri@xxxxxxx wrote:
> wierd v$sort_usage is not in the data dictionary doc
> on otn. ther eis one called v$tempseg_usage which
> looks very similiar.
>


        
                
__________________________________
Do you Yahoo!?
Yahoo! Movies - Buy advance tickets for 'Shrek 2'
http://movies.yahoo.com/showtimes/movie?mid=1808405861 
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------


----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: