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: TEMP Segments

RE: TEMP Segments

From: Benhayoune khalid <benhayoune_at_maroclear.co.ma>
Date: Mon, 15 May 2000 18:14:07 -0000
Message-Id: <10498.105682@fatcity.com>


This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible.

One of the tasks of SMON is to cleanup temporary segments of aborted transactions. So, after the next wakeup of SMON this segment will be dropped. But the next wakeup of SMON can take more than two hours from now and you have to take action immediately to prevent other sessions = to
fail as well and you cannot bounce the Oracle instance. So, how do you get rid of this temporary segment as quickly as possible?=20
=20

connect to SQL*Plus as SYSTEM (or SYS) and execute the following commands :

SQL> column c noprint new_value v_pct;=20 SQL> select pct_increase c from dba_tablespaces where tablespace_name =
=3D

'TEMP';=20
SQL> alter tablespace temp default storage (pctincrease &&v_pct);=20 SQL> exit=20

First, the current pct_increase value of the TEMP tablespace is = selected
and stored in the v_pct variable. Then this v_pct variable is used to ALTER the tablespace with the same value for pct_increase. This seems strange, but is done to force a data dictionary change which = immediately
triggers SMON. SMON wakes up, detects a temporary segment of an aborted transaction and immediately drops it.=20 This is the fastest method (so far I know) to cleanup temporary = segments
without bouncing the Oracle instance.=20

-----Message d'origine-----
De : Wayne S Bellefeuille [mailto:wbellefe_at_allina.com] Envoy=E9 : lun. 15 mai 2000 18:26
=C0 : Multiple recipients of list ORACLE-L
Objet : TEMP Segments

Running Oracle 8.0.5 on AIX...

In doing rebuilds of indexes, I am blowing up with the following error: ORA-01652: unable to extend temp segment by 2048 in tablespace PMADTLX

In retrying, the rebuild, I get this message: ORA-01658: unable to create INITIAL extent for segment in tablespace PMADTLX In looking at DBA_SEGMENTS, there are a whole bunch of TEMPORARY = segment
types
hanging out in tablespace PMADTLX. I thought SMON should clean up = these
TEMPORARY segments automatically.

I am assuming this is a bug in Oracle, but thought I would ask around.

Anyone know a full-proof "trick" to get rid of these. I tried creating a dummy
table with a small INITIAL and big NEXT with MINEXTENTS 2. It blew up on the
NEXT extent, but did not clean up the tablespace.

Wayne

--=20
Author: Wayne S Bellefeuill
  INET: wbellefe_at_allina.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.0.1459.75">
<TITLE>RE: TEMP Segments</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>One of the tasks of SMON is to cleanup temporary = segments of aborted transactions. So, after the next wakeup of SMON = this segment will be dropped. But the next wakeup of SMON can take more = than two hours from now and you have to take action immediately to = prevent other sessions to fail as well and you cannot bounce the Oracle = instance. So, how do you get rid of this temporary segment as quickly = as possible? </FONT></P>

<P><FONT SIZE=3D2>&nbsp;</FONT>
<BR><FONT SIZE=3D2>connect to SQL*Plus as SYSTEM (or SYS) and execute = the following commands :</FONT>
</P>

<P><FONT SIZE=3D2>SQL&gt; column c noprint new_value v_pct; </FONT> <BR><FONT SIZE=3D2>SQL&gt; select pct_increase c from dba_tablespaces = where tablespace_name =3D 'TEMP'; </FONT> <BR><FONT SIZE=3D2>SQL&gt; alter tablespace temp default storage = (pctincrease &amp;&amp;v_pct); </FONT>
<BR><FONT SIZE=3D2>SQL&gt; exit </FONT>
</P>

<P><FONT SIZE=3D2>First, the current pct_increase value of the TEMP = tablespace is selected and stored in the v_pct variable. Then this = v_pct variable is used to ALTER the tablespace with the same value for = pct_increase. This seems strange, but is done to force a data = dictionary change which immediately triggers SMON. SMON wakes up, = detects a temporary segment of an aborted transaction and immediately = drops it. </FONT></P>

<P><FONT SIZE=3D2>This is the fastest method (so far I know) to cleanup = temporary segments without bouncing the Oracle instance. </FONT> </P>

<P><FONT SIZE=3D2>-----Message d'origine-----</FONT> <BR><FONT SIZE=3D2>De : Wayne S Bellefeuille [<A = HREF=3D"mailto:wbellefe_at_allina.com" =
TARGET=3D"_blank">mailto:wbellefe_at_allina.com</A>]</FONT>

<BR><FONT SIZE=3D2>Envoy=E9 : lun. 15 mai 2000 18:26</FONT>
<BR><FONT SIZE=3D2>=C0 : Multiple recipients of list ORACLE-L</FONT>
<BR><FONT SIZE=3D2>Objet : TEMP Segments</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Running Oracle 8.0.5 on AIX...</FONT> </P>

<P><FONT SIZE=3D2>In doing rebuilds of indexes, I am blowing up with = the following error:</FONT>
<BR><FONT SIZE=3D2>ORA-01652: unable to extend temp segment by 2048 in = tablespace PMADTLX</FONT>
</P>

<P><FONT SIZE=3D2>In retrying, the rebuild, I get this message:</FONT> <BR><FONT SIZE=3D2>ORA-01658: unable to create INITIAL extent for = segment in tablespace PMADTLX</FONT>
</P>

<P><FONT SIZE=3D2>In looking at DBA_SEGMENTS, there are a whole bunch = of TEMPORARY segment types</FONT>
<BR><FONT SIZE=3D2>hanging out in tablespace PMADTLX.&nbsp; I thought = SMON should clean up these</FONT>
<BR><FONT SIZE=3D2>TEMPORARY segments automatically.</FONT> </P>

<P><FONT SIZE=3D2>I am assuming this is a bug in Oracle, but thought I = would ask around.</FONT>
</P>

<P><FONT SIZE=3D2>Anyone know a full-proof &quot;trick&quot; to get rid = of these.&nbsp; I tried creating a dummy</FONT> <BR><FONT SIZE=3D2>table with a small INITIAL and big NEXT with = MINEXTENTS 2.&nbsp; It blew up on the</FONT> <BR><FONT SIZE=3D2>NEXT extent, but did not clean up the = tablespace.</FONT>
</P>

<P><FONT SIZE=3D2>Wayne</FONT>
</P>

<P><FONT SIZE=3D2>-- </FONT>
<BR><FONT SIZE=3D2>Author: Wayne S Bellefeuill</FONT>
<BR><FONT SIZE=3D2>&nbsp; INET: wbellefe_at_allina.com</FONT>
</P>

<P><FONT SIZE=3D2>Fat City Network Services&nbsp;&nbsp;&nbsp; -- (858) = 538-5051&nbsp; FAX: (858) 538-5051</FONT> <BR><FONT SIZE=3D2>San Diego, =
California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public Internet = access / Mailing Lists</FONT>
<BR><FONT =

SIZE=3D2>---------------------------------------------------------------=
-----</FONT>
<BR><FONT SIZE=3D2>To REMOVE yourself from this mailing list, send an = E-Mail message</FONT>
<BR><FONT SIZE=3D2>to: ListGuru_at_fatcity.com (note EXACT spelling of = 'ListGuru') and in</FONT>
<BR><FONT SIZE=3D2>the message BODY, include a line containing: UNSUB = ORACLE-L</FONT>
<BR><FONT SIZE=3D2>(or the name of mailing list you want to be removed = Received on Mon May 15 2000 - 13:14:07 CDT

Original text of this message

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