We have temp tablespace which is occupied more space in our db.Can anyone help us to clear the temp tablespace.if we remove this, will it be a problem for our db.
Hi,
The top of your Temp-Ts allocates Blocks is the High-Water-Mark.
This means that the place could be free for new transaction even it is allocated.
You can monitor which SQL uses the temp-Ts actuall.
Recreating Temp will not help you.
You have to identify and tune the SQL's which fill the Temp-Ts
Orca
SELECT /*+ORDERED*/su.tablespace,
se.sid,
se.user#,
se.serial#,
su.blocks,
su.segtype,
sa.sql_text
FROM v$sort_usage su
,v$sqlarea sa
,v$session se
WHERE su.session_addr = se.saddr
AND se.sql_address = sa.address(+)
/
select segment_name,tablespace_name,sum(bytes/(1024*1024)) "Table Size in MB"
from user_segments
where tablespace_name=''
group by segment_name,tablespace_name
order by sum(bytes/(1024*1024)) desc
This query would help u in finding the Segment Sizes
Originally posted by Seenivas Thanx for ur info and i would like to know which table occupies more space on the tablespace.
You can't create any permanent segment in TEMP tablespace so there is no question of having tables there. TEMP tablespace have segments used for sorting the data.
If you want to monitor the space usage by table in permanent tablespaces then you can use the query Sridhar has provided.
HTH
Sanjay G.
Oracle Certified Professional 8i, 9i.
"The degree of normality in a database is inversely proportional to that of its DBA"
Bookmarks