Home » RDBMS Server » Server Administration » TEMP Tbsp full, I think I have cleared the issue, but how to tell...
TEMP Tbsp full, I think I have cleared the issue, but how to tell... [message #122097] |
Thu, 02 June 2005 16:57 |
lhradowy
Messages: 5 Registered: June 2005 Location: Winnipeg, Canada
|
Junior Member |
|
|
I just received an error from the alert log:
ORA-1652: unable to extend temp segment by 128 in tablespace TEMP
Now I do understanding that the TEMP tablespace with not size down until the database is restarted, so stay 99.9% is not a bad thing. But, what I do what to know is if I did everything to correct the problem.
First I ran:
select sql_text,
sid,
c.username,
machine,
tablespace,
extents,
blocks
from sys.v_$sort_usage a,
sys.v_$sqlarea b,
sys.v_$session c
where a.sqladdr = b.address and
a.sqlhash = b.hash_value and
a.session_addr = c.saddr
order by sid
This gave me the Sid, User name, sql_text ( I did not create this query myself, but pulled from net)
Output:
222.00 USER1 WORKGROUP\LAPT TEMP 132.00 17,160.00
I do not know how the extents and blocks (132.00 & 17,160) plays into, or what it means??? But, it did return the user name and sid
I then ran:
select s.sid || ',' || s.serial# sid,
s.username,
u.tablespace,
substr(a.sql_text, 1, (instr(a.sql_text, ' ')-1)) sql_text,
round(((u.blocks*p.value)/1024/1024),2) size_mb
from v$sort_usage u,
v$session s,
v$sqlarea a,
v$parameter p
where s.saddr = u.session_addr
and a.address (+) = s.sql_address
and a.hash_value (+) = s.sql_hash_value
and p.name = 'db_block_size'
group by
s.sid || ',' || s.serial#,
s.username,
substr(a.sql_text, 1, (instr(a.sql_text, ' ')-1)),
u.tablespace,
round(((u.blocks*p.value)/1024/1024),2)
(again from net)
This came up with 3...
SID USERNAME TABLESPACE SQL_TEXT SIZE_MB
123,10674 ACAPP TEMP -- 10.16
193,1966 USER2 TEMP SELECT 704.84
222,3729 USER1 TEMP SELECT 134.06
I contacted User2 and had him log off. This still did not clear. So I did an:
Alter system kill session '193,1966';
User1, this query ended or the user killed him self. Now I understand, it is probably because they were quering on columns that were not indexed, and the query was quite huge. BUt, what I would like to know is if I covered all my steps to fix the problem.
Q1: Also, I did not touch the ACAPP, since this is part of the application and I do not know if I would break anything. How do I check to see what this SID is actually doing? Or to find more info on it.
Q2: The SIZE_MB? Is this the amount that the query is reserving in the temp tablespace to run?
Q3: What other checks can be run to be sure I cleared this problem up?
|
|
|
Re: TEMP Tbsp full, I think I have cleared the issue, but how to tell... [message #138610 is a reply to message #122097] |
Thu, 22 September 2005 12:06 |
sunil_v_mishra
Messages: 506 Registered: March 2005
|
Senior Member |
|
|
hi,
Well i had goen through your issue in your case i will like to tune query which is occupying whole temp tablespace...or you can check size of your temp tablespace if it is small then resize it (i.e. biger than now)
better idea is to tune the query so that it should not take lot of temp space while executing.
Try it out what i had said... i think it will solve your issue
Regards
Always Friend sunilkumar
|
|
|
Goto Forum:
Current Time: Fri Jan 10 10:15:23 CST 2025
|