Smon not clearing my temp tablespace

hi guys,
even after I shutdown and restart my instance, my temp tablespace is showing as having 27.5 out of 30G used. why is this happening?
thanks

Hi OracleGuy777,
It is "normal" that temp tablespaces appear full, as the segments are not de-allocated. To know how much space is being used by active queries and to know if your are about to run out of temp tablespace use v$sort_usage and v$sort_segment.
E.g.:
These were for 8i/9i - should be OK in 10:
select TABLESPACE_NAME,TOTAL_BLOCKS,USED_BLOCKS,
FREE_BLOCKS, round((used_blocks/total_blocks), 2) "PERC_USED"
from v$sort_segment;Or:
SELECT A.tablespace_name tablespace, D.mb_total,
SUM (A.used_blocks * D.block_size) / 1024 / 1024 mb_used,
D.mb_total - SUM (A.used_blocks * D.block_size) / 1024 / 1024 mb_free
FROM v$sort_segment A,
(SELECT B.name, C.block_size, SUM (C.bytes) / 1024 / 1024 mb_total
FROM v$tablespace B, v$tempfile C
WHERE B.ts#= C.ts#
GROUP BY B.name, C.block_size) D
WHERE A.tablespace_name = D.name
GROUP by A.tablespace_name, D.mb_total;or for user details:
SELECT a.sid, a.username, a.osuser, a.program, a.tablespace_name,
a.bytes "BYTES_USED", round(a.blocks / b.total_blocks,3) "PERC_USED"
from (select sor.tablespace_name, ses.sid, ses.username,
ses.osuser, ses.program, sor.blocks, sor.bytes
from (select /*+ optimizer rule */ u.tablespace "TABLESPACE_NAME", u.session_addr,
sum(u.blocks) blocks, sum(u.blocks) * &blksize bytes
FROM v$sort_usage u GROUP BY u.session_addr, u.tablespace) sor,
(select /*+ optimizer rule */ saddr, sid, username, osuser, program from v$session) ses
where ses.saddr=sor.session_addr) a, (select tablespace_name, sum(decode(maxblocks,0,blocks,maxblocks)) "TOTAL_BLOCKS"
from dba_temp_files group by tablespace_name) b
where a.tablespace_name=b.tablespace_name order by a.bytesCheers,
Francisco Munoz Alvarez
http://www.oraclenz.com

Similar Messages

  • TEMP tablespace 98%

    Hi,
    in 8.1.7 under Win 2003 (yes not supported). TEMP tablespace is used at 98%. Should we enlarge temp file or it is not necessary and Oracle manges it automatically ?
    Many thanks.

    > TEMP tablespace is used at 98%.
    Question.. what is better? A 50% used TEMP tablespace? And if you think so, why would it be "better"?
    Consider this for CPUs. Let's say you have 32 CPUs in your server. Only 2 are used at 100%. The remaining 30 CPUs are idle.
    What is good about this? Nothing much. And bad? What is especially bad is that you/your company paid loads of money for those 30 CPUs that are now sitting and doing absolutely nothing. What a waste!
    Back to temp space. Is a 50% temp space usage "better" than 98%? No.
    Temp space is a resource. A resource (CPU, space, memory, etc) is there to be used. If it is only used 50%, then the remaining 50% is a "waste". So in that respect, 98% is a LOT better than 50%. It seems that temp space has been correctly sized and that the vast majority of it, is being used.
    When is 98% (or 99% or a 100%) a problem? When there is not enough.. and more is still needed. And Oracle will inform you of that via error messages. (e.g. unable to extend temp space by x)
    This is only part of the resource utilisation puzzle of course. The other parts deal with how effectively the resources are being used. Is that 98% utilisation effective and efficient utilisation? (which needs you to look at HOW it is being used in order to determine WHY it is being used in order to answer these questions)

  • Temporary tablespace not cleared

    Hi,
    I have a temporary tablespace in one of my Oracle 9i databases that does not ever get cleared of data. I have altered the tablespace to autoextend by a few megabytes each time but I was wondering why a temp tablespace remains full even after all sessions are done. Its grown larger than my datafiles and I need a solution. Any ideas?
    Thanks in advance.
    James.

    Hi James,
    You need to alter your temporary tablespace with adding a fresh new (small) tempfile, and when done, you need to put your other 'old' tempfiles offline so that you can delete them afterwards.
    Your temporary tablespace will not shrink/release the space even when you bounce your DB (the undo tbs will)
    Regards,
    Thierry

  • SMON is blocking temp tablespace drop

    Hi all,
    My TEMP TBS became 47G and I want to get rid of that monster. I created the second TEMP TBS, switched default TBS and wanted to drop the huge one, but it hangs there for ever... When I look on the database to see what's going on i see the following:
    09:47:33 db_manager@odsp8> @blocking
    BLOCKING_STATUS
    @bla-bla-bla-bla ( SID=329 ) is blocking SYS@bla-bla-bla-bla ( SID=301 )
    09:55:42 db_manager@odsp8> @whois
    Enter value for sid: 329
    old 3: where sid=&sid
    new 3: where sid=329
    USERNAME STATUS OSUSER MACHINE PROGRAM
    ACTIVE oracle bla-bla-bla-bla oracle@bla-bla-bla-bla *(SMON)*
    Definitely, am not gonna kill SMON, but I also need to throw this big TEMP away ASAP.
    Does anybody know how to do that and overcome the lock?
    Thanks in advance.
    M
    PS: Oracle 10.2.0.4 RHEL4 64bit
    Edited by: MarGur on Jul 20, 2010 9:04 AM

    >
    sqlplus
    / as sysdba
    shutdown immediate
    startup mountAnd then ??
    As soon as you open the database, SMON will pick up where it left .
    Even with another temp tablespace set to as default, SMON will continue cleaning up (coalescing) the extents.
    If I remember correctly, we had this also some years ago, we issued:
    ALTER DATABASE DATAFILE 'your tempfile' OFFLINE DROP;Then shutdown and restart the database in mount mode and drop the tablespace.
    After that open the database for use.
    This was then our last - most dirty - solution, while we had waited for 3 days for SMON to finish.
    HTH,
    FJFranken
    My Blog: http://managingoracle.blogspot.com
    P.S. If this answers your question, please set the thread to answered and award the points. It is appreciated

  • Queries are not releasing temp tablespace in 11g standard edition

    Queries are not releasing temp tablespace in 11g standard edition

    user8928004 wrote:
    Hi any one faced one issue.... please help
    Patience, Grasshopper
    You posted this follow-up a mere two minutes after your previous post.
    This forum is not a chat line, and it is not paid support.
    Everyone here has a job for which they are paid, and this forum is not it.
    No one is responsible for monitoring it and giving a quick response.
    Furthermore, it is a global forum.  The person with the information you seek may very well live 20 time zones away from you and was going to bed just as you posted. He will not even see your post for several more hours.
    Your original post went up in the middle of the night for half the world.
    No one with the information you seek is deliberately withholding it until you sound sufficiently desperate.
    ======================================================
    Please present evidence to backup your assertion that "Queries are not releasing temp tablespace"
    From the very fine 11g Database Administrator's Guide,   at Managing Tablespaces
    Space Allocation in a Temporary Tablespace
    You can view the allocation and deallocation of space in a temporary tablespace sort segment using the V$SORT_SEGMENT view. The V$TEMPSEG_USAGE view identifies the current sort users in those segments.
    When a sort operation that uses temporary space completes, allocated extents in the sort segment are not deallocated; they are just marked as free and available for reuse.

  • Temp Tablespace Group or Not

    Hi Gurus,
    We are in desiging phase of databse and wanted to look at the benefits for temporary tablespace group over the conventional temporary tablespace.
    Any idea?
    Thoughts are welcome
    Can somebody move this thread to Database General? I think I have posted it at wrong place
    Regards,
    Virendra
    Edited by: Virendra.K1.Yadav on Oct 1, 2012 1:32 PM

    The thrust of my replies is that OP hasn't really determined 'the type of thing' that needs done so, as yet, there IS no target to aim at. The solution could be as simple as enabling PARALLEL operations that are disabled server wide for some reason. The example doesn't resemble the temp tablespace group as PARALLELISM by default is enabled but temp tablespace group is not. As mentioned by John I am still in design phase of new database as we are migrating from orace 10gR2 to 11gR2 and was thinking of option. In 10g temp space is around 700G and we are trying to decrease it as low as possible without affecting the query performance at least (if not improve).
    Certainly it can be informative to study and learn Oracle features, what they are for, relevant scenarios, etc. But you still wind up with a solution waiting for an appropriate problem. One can not wait for the bug to be hit and then apply PSU. There are two things proactive and reactive. Waiting for problem to occur and then go for solution is not a good idea for me and I consider more investment in designing than in maintaining.
    It is the problem/cause definitions that are lacking here. Until an appropriate problem has been identified there isn't really any basis for applying any particular solution.I don't agree, sitting idle and waiting for problem to occur and then applying solution.
    Regards,
    Virendra

  • Can you tell me why my temp tablespace can not release automatically?

    when i up the database, the temp tablespace is used by o,but after some time it is used 99.99%,even all the task are finished,it is still used 99.99%,and can not release automatically!
    who can tell me than is why?

    Are you receiving an error ?
    A "Temporary" tablespace manages it's allocation differently than a normal tablespace. The idea is to avoid the overhead of extent allocation, etc.
    Take a look at:
    http://asktom.oracle.com/pls/ask/f?p=4950:8:134496932618587661::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:108812348061,
    or
    http://asktom.oracle.com/pls/ask/f?p=4950:8:134496932618587661::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:1384603628260,
    or (these URLs don't seem to be pasting correctly)
    go to Ask Tom and search on "temporary" in the "page contains" option in advance search.
    Ken

  • Temp tablespace drop 관련 질문임다!

    temp tablespace가 거의 100%사용이어서, db shutdown하고 다시 살렸는데도
    줄지 않아서 (사실 이것도 왜 안주는지 궁금하거등요~!)
    우선 old_temp tablespace를 new_temp tablespace를 만들었습니다.
    즉,,,제가 한작업들을 개략 적어보면요
    1) create temporary tablespace new_temp tempfile~~~~;
    2) drop tablespace old_temp;
    3) alter database default temporary tablespace new_temp;
    하고 나서 모든 유저에 지정되어있는 temporary tablespace를 new_temp로 지정
    해줘야 하쟎아요
    즉, alter user scott temporary tablespace new_temp; 이렇게요...
    근데 이걸 안해줬는데도 에러없이 scott유저는 소트를 수행하드라구요...
    이거...정상인건가요????
    ***추가질문~!
    그리고 템프싸이즈가 줄지않고 계속늘어날때의 원인과 체크포인트좀 부탁드립니다.

    8i에서는 tempfile이란 개념은 있었으나 default temporary tablespace라는
    개념은 없었습니다. 그래서 유저에게 직접 default tablespace를 지정해주어야
    했었습니다.
    하지만.. 9i부터는 alter database default temporary tablespace new_temp;
    명령을 하기만 하면 모든 유저의 default temporary tablespace가 default로
    지정되어 있지 않으면 new_temp로 됩니다.
    물론 이 경우에도 수동으로 temp를 지정할 수 있으니 실제로 유저가
    temp공간을 어디에 사용하는지는..
    select username, temporary_tablespace from dba_users; 를 통해서
    확인해야 합니다.
    scott유저는 default temporary tablespace로 지정되어서 그 쪽 temp를
    사용하게 되니, 에러가 나지 않겠죠.
    default temporary tablespace가 무엇으로 지정되어 있는지는,
    select * from database_properties; 또는 select * from sys.props$; 로 조회하면
    temporary tablespace라는 이름으로 어떤 값이 들어가 있는지 보입니다.
    그리고 temp는 DB를 내렸다가 올리면 smon프로세스가 clear시켜줍니다.
    temp는 아시다 싶이 당연히 sort를 해서 발생하는 것이구요. 그렇다면..
    temp가 계속해서 full이 난다면.. temp를 사용하는 세션을 확인하고
    temp를 사용하는 세션의 쿼리를 뽑아낸다면 쉽게 해결이 되겠죠.
    아래는 제가 경험해서 처리한 것입니다.
    저는 temporary tablespace가 full 났는데 도대체 쿼리를 못잡는 것이었습니다.
    그래서 어떻게 했을까요? Secure CRT에 세션로그를 걸어두고 모니터링을 했죠.
    vi stat.sh
    interval=30 # Sleep interval in seconds
    reps=1000000 # n times
    j=1 # Loop variable
    while [ $j -le ${reps} ]
    do
    echo " ----cycle ${j} / ${reps} --------"
    sqlplus -s system/패스워드<<EOF
    @sw.sql ${j}
    exit
    EOF
    cat sess_${j}.dat >> sw.dat
    rm sess_${j}.dat
    sleep ${interval}
    j=`expr ${j} + 1`
    done
    exit 0
    vi sw.sql
    set line 150
    set concat "+"
    col username format a10
    col osuser format a10
    col tablespace format a15
    spool sess_&1.dat
    SELECT b.tablespace,
    b.segfile#,
    b.segblk#,
    b.blocks,
    a.sid,
    a.serial#,
    c.spid,
    a.username,
    a.osuser,
    a.status,
    a.sql_hash_value
    FROM v$session a,
    v$sort_usage b,
    v$process c
    WHERE a.saddr = b.session_addr and a.paddr=c.addr
    ORDER BY b.tablespace, b.segfile#, b.segblk#, b.blocks;
    spool off
    stats.sh 를 수행하고 PC킨 상태로 그냥두고 다음날 왔더니 아래처럼 temp를
    계속 쓰는 넘이 나온거죠..
    딱걸렸습니다.ㅎㅎ
    TEMP 93 2550817 13824 92 58284 3193 PVB oracle ACTIVE 1126923165
    ----cycle 1792 / 1000000 --------
    TEMP 93 2550817 43008 92 58284 3193 PVB oracle ACTIVE 1126923165
    ----cycle 1793 / 1000000 --------
    TEMP 93 2550817 72192 92 58284 3193 PVB oracle ACTIVE 1126923165
    ----cycle 1794 / 1000000 --------
    TEMP 93 2550817 101376 92 58284 3193 PVB oracle ACTIVE 1126923165
    ----cycle 1795 / 1000000 --------
    TEMP 93 2550817 131072 92 58284 3193 PVB oracle ACTIVE 1126923165
    ----cycle 1796 / 1000000 --------
    TEMP 93 2416673 18944 123 5171 3197 PVB oracle ACTIVE 1126923165
    TEMP 93 2550817 159744 92 58284 3193 PVB oracle ACTIVE 1126923165
    ----cycle 1797 / 1000000 --------
    TEMP 93 2416673 48128 123 5171 3197 PVB oracle ACTIVE 1126923165
    TEMP
    sql_hash_value값이 1126923165 이니 아래 쿼리에다가 넣으면 full 쿼리가 나오죠..
    결국엔 개발자가 모든 소스코드에서 변경을 했어야 했는데.. 그렇게 하지 않아서
    일부 웹서버에서의 쿼리가 이상하게 where조건없이 수행되었고 그래서 temp가
    full 났던 것이랍니다.
    vi sidhashsql.sql
    set pages 1000
    col sql_text format a120
    select sql_text from v$sqltext_with_newlines
    where hash_value=&hash_value order by piece;
    SQL> @sidhashsql
    Enter value for hash_value: 1126923165
    old 2: where hash_value=&hash_value order by piece
    new 2: where hash_value=1126923165 order by piece
    SQL_TEXT
    boan~~~~!!
    아래 너무 자세하게 나와있죠?
    No. 18484
    TEMPORARY TABLESPACE에서 TEMPFILE 과 DATAFILE의 차이점 (8.1.X ~ 9I)
    ============================================================
    PURPOSE
    이 문서에서는 Oracle 7.3부터 사용되어 오던 create tablespace ... temporary
    형태와, 8i부터 사용되는 create temporary tablespace... 의 차이점을 정리해
    본다.
    tablespace의 temporay type과 permanent type에 대한 비교는 <Bulletin#: 11938>
    를 참조하도록 하고 여기에서는 permanent에 대해서는 논외로 한다.
    Explanation
    temporary segment가 생성 가능한 tablespace의 type과 temporary tablesapce에서
    datafile과 tempfile의 차이점을 설명한다.
    1. temporary segment를 생성가능한 tablespace type 정리
    temporary tablespace의 tempfile과 datafile을 비교하기 전에, tablespace의
    type들을 확인해 보고, 이 중 temporary segment가 생성될 수 있는 tablespace
    type을 version별로 정리해본다.
    tablespace는 7.2까지는 permanent type으로 dictionary managed방식으로
    space를 할당/해제하던 방식만이 존재했다. db user의 temporary tablespace로
    임의의 tablespace를 지정가능하였고, 해당 db user의 sort operation은
    지정된 tablespace에서 발생하며, 다른 tablespace와 특별히 구분되는 것은
    없었다.
    이후, 7.3에 temporary type이 추가되고, 8i에서 locally managed type과 일반
    datafile이 아닌 tempfile이 소개되면서 8i를 기준으로 기본적으로 다음과 같이
    4가지 형태의 tablespace 형태가 가능하다.
    이중 (1) ~ (3)번까지는 일반 datafile형태이고, (4)번의 경우는 이 문서에서
    자세히 살펴볼 tempfile이다.
    (locally managed와 dictionary managed의 차이점 및 사용 방법은
    <Bulletin #: 18261>과 <Bulletin #: 11860> 참조)
    (1) permanent-dictionary managed
    (2) permanent-locally managed
    (3) temporary-dictionary managed
    (4) tempfile-locally managed
    [주의] 위의 종류에 temporary datafile에 locally managed 형태의 tablespace는
    없는것에 주의한다.
    그리고 만약 system tablespace가 locally managed로 이미 생성된 경우에는
    이후 모든 tablespace는 locally managed로 생성이 가능하고, dictionary
    managed 형태는 생성하면 ORA-12913 (Cannot create dictionary managed
    tablespace) 오류가 발생하게 된다.
    이러한 여러가지 type의 tablespace중 temporary segment를 생성할 수 있는
    tablespace에 제약이 존재한다.
    - 8i: 어떠한 형태의 tablespace라도 db user의 temporary tablespace로 지정
    가능하다. 단, permanent-locally managed 형태의 tablespace에 sort가
    발생하게 되면 ORA-3212 (Temporary Segment cannot be created in
    locally-managed tablespace) 오류가 발생하게 된다.
    SQL> alter user scott temporary tablespace PERM_LOCAL;
    User altered.
    connect scott/tiger
    SQL> select * from dept order by 1;
    ORA-03212: Temporary Segment cannot be created in locally-managed
    tablespace
    - 9i: db user의 default temporary tablespace 지정 자체가 다음 두 가지
    type만이 가능한다.
    -temporary-dictionary managed
    -tempile-locally managed
    만약 permanent type의 tablespace를 db user의 tempoary tablespace로
    지정하면, ORA-12911 (permanent tablespace cannot be temporary tablespace)
    오류가 발생한다.
    2. tempfile과 datafile의 비교
    아래에서 tablespace지정시 tempfile과 datafile형태를 비교하게 되는데,
    단, datafile형태의 경우 permanent type에 대해서는 언급하지 않는다.
    (1) tempile의 특징
    Oracle7.3에서 tablespace에 생성시 temporary option을 이용하여 생성되는
    tablespace를 구성하는 화일은 datafile이다. 단지 이것이 기존의 permanent
    type과 구별되는것은 이 tablespace에 생성되는 segment들이 매번 sort
    operation마다 별도로 생성되는 대신, 하나의 segment로 만들어지면서
    다른 session에서의 sort operation이 같은 segment를 공유하는 것이다.
    (자세한 것은 <Bulletin#: 11938> 참조)
    Oracle8.1부터 추가된 tempfile형태의 중요한 특징은 tempfile에 발생하는
    변경사항은 redo log file에 기록되지 않는다는 것이다. tempfile에
    checkpoint정보도 기록하지 않고 이에 따라 datafile recovery시에도
    tempfile에 대해서는 recovery가 필요없게 된다.
    이와 같은 이유로 standby database에서 read-only mode로 open하고
    조회시 sort가 발생하여 tempfile이 변경되는것은 문제가 되지 않아
    사용이 가능하다.
    그리고 이미 앞에서 설명한 것과 같이 tempfile은 항상 locally managed
    type으로만 생성이 되며, datafile형태의 temporary tablespace는 다음과
    같이 locally managed type으로 생성 자체가 불가능하다.
    SQL> create tablespace temp_datafile_local
    2 DATAFILE '/ora/oradata/V920/temp_data.dbf' size 100M
    3 TEMPORARY
    4 EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K;
    ORA-25144: invalid option for CREATE TABLESPACE with TEMPORARY contents
    (2) temporary tablespace 생성 방법 비교
    - tempfile형태의 경우
    tempfile로 temporary tablespace를 생성하는 경우는 다음과 같이
    생성하여야 하며, 반드시 locally managed 형태로만 생성 가능하다.
    SQL> create TEMPORARY tablespace temp_tempfile_local
    2 TEMPFILE '/ora/V920/temp_temp.dbf' size 100M
    3 EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K;
    아래 명령어에서 3번 line을 제거하고 생성하여도 default로 locally
    managed로 생성이 되며, dictionary managed 형태로 생성하고자
    3번 line대신 storage option을 추가하면
    ORA-2180 (invalid option for CREATE TABLESPACE) 오류가 발생한다.
    - datafile형태의 경우
    다음과 같은 형태로 생성하게 되면, dictionary managed type의
    temporary datafile형태로 tablespace가 만들어진다. 단, 9i의 경우
    이미 앞에서 언급한대로 system tablespace가 locally managed인 경우에는
    이와 같은 dictionary managed tablespace 생성은 ORA-12913이 발생하면서
    불가능하게 된다.
    SQL> create tablespace temp_datafile_dict
    2 datafile '/ora/oradata/V920/temp_data.dbf' size 100M
    3 TEMPORARY;
    (3) dictionary view 의 차이
    먼저 dba_tablespaces를 통해
    SQL> select tablespace_name, contents, extent_management,
    allocation_type from dba_tablespaces;
    TABLESPACE_NAME CONTENTS EXTENT_MAN ALLOCATIO
    TEMP_TEMPFILE_LOCAL TEMPORARY LOCAL UNIFORM
    TEMP_DATAFILE_DICT TEMPORARY DICTIONARY
    - tempfile의 경우
    SQL> select STATUS, ENABLED, NAME from v$tempfile;
    STATUS ENABLED NAME
    ONLINE READ WRITE /ora/V920/temp_temp.dbf
    SQL> select FILE_NAME, TABLESPACE_NAME from dba_temp_files;
    FILE_NAME TABLESPACE_NAME
    /ora/V920/temp_temp.dbf TEMP_TEMPFILE_LOCAL
    - datafile 형태의 경우
    다음과 같이 v$datafile과 dba_data_files를 통해 조회한다.
    SQL> select STATUS, ENABLED, NAME from v$datafile;
    STATUS ENABLED NAME
    ONLINE READ WRITE /ora/oradata/V920/temp_data.dbf
    SQL> select FILE_NAME, TABLESPACE_NAME from dba_data_files;
    FILE_NAME TABLESPACE_NAME
    /ora/oradata/V920/temp_data.dbf TEMP_DATAFILE_DICT
    (4) tempfile의 삭제에 대해서
    datafile의 경우 tablespace를 삭제하지 않고 datafile만 삭제하는 방법은
    존재하지 않는다. 물론 alter database datafile 'filename' offline drop;
    과 같은 command가 있지만 이것도 datafile을 데이타베이스에서 지워주는
    것이 아니며 이렇게 offline drop된 datafile을 포함하는 tablespace는
    recovery가 불가능한 경우라면 tablespace자체를 삭제해야 한다.
    그런데 tempfile의 경우는 temporary tablespace는 그대로 유지한 채,
    tempfile만 삭제하는 것이 가능하다.
    SQL> alter database tempfile '/oradata/V817/temp_temp01.dbf'
    2 drop;
    8i의 경우라면 이와 같은 명령어 후 실제 directory로 이동하여 직접
    tmep_temp01.dbf를 삭제하여야 한다.
    9i에서는 drop뒤에 including datafiles 라는 option을 추가하여 tempfile의
    drop시 바로 os상에서도 삭제되도록 할 수 있다.
    SQL> alter database tempfile '/oradata/V817/temp_temp01.dbf'
    2 drop including contents;
    만약 이러한 방법으로, tempfile을 해당 temporary tablespace에서 모두
    삭제한 경우, 실제 해당 tablespace에 disk sort가 필요하게 되면,
    그때는 ORA-25153 (Temporary Tablespace is Empty) 오류가 발생하게 된다.
    이때는 다음과 같이 임의의 tempfile을 다시 추가할 수 있다.
    SQL> alter tablespace TEMP_TEMPFILE_LOCAL
    2 add tempfile '/oradata/V817/temp_temp02.dbf';
    Reference Documents
    <Note:160426.1> TEMPORARY Tablespaces : Tempfiles or Datafiles ?
    글 수정:
    민천사 (민연홍)
    글 수정:
    민천사 (민연홍)
    가장 중요한 v$session의 sql_hash_value 컬럼이 안들어가서
    수정하였습니다. 죄송합니다.

  • Informatica Workflow fails because of TEMP tablespace

    Hi,
    I am trying to do a Complete Oracle 11.5.10 load. However my execution plan fails because the SDE_ORA_Payroll_Fact fails. The error in the session log is as follows:
    READER_1_1_1> RR_4035 SQL Error [
    ORA-01652: unable to extend temp segment by 128 in tablespace TEMP
    From the error message it is very clear that the Source Qualifier is unable to select the data from the source tables. i have increased the TEMP tablespace too however I keep getting the error. Because of this error my other mappings are also Stopped. Any solutions to this problem?

    Hi,
    Would you not want to use the following parameters to say load one fiscal year at a time?
    Analysis Start Date
    The start date used to build the day dimension and to flatten exchange rates and costs lists.
    $$ANALYSIS_START, $$ANALYSIS_START_WID
    Default : Jan 1, 1980
    Analysis End Date
    The end date used to build the day dimension and to flatten exchange rates and costs lists.
    $$ANALYSIS_END, $$ANALYSIS_END_WID
    Default : Dec 31, 2010
    Thanks,
    Chris

  • PDB without local TEMP Tablespace

    Due to the Oracle Database 12c Concepts Guide it should be possible to create a PDB without a local TEMP Tablespace and the create PDB syntax includes the option (MAX_SHARD_TEMP_SIZE).
    But I cannot find any hint how to create a PDB without a TEMP Tablespace or how to change the default temp tablespace to point to the CDB:
    Any help will be appreciated.

    There is no standard way to create a PDB without a TEMP tablespace
    Yes - there is. But you CLEARLY don't want to do things the standard way. You want to use some particular non-standard way.
    It is not 'standard' to create a database without a temporary tablespace. That is almost ALWAYS a mistake. That generally happens when you use the CREATE DATABASE command and don't specify it properly.
    When you create a database you do NOT have to create a temporary tablespace. That has been the RULE from the very beginning and it is still true for 12c. For proof see the DBA Guide:
    http://docs.oracle.com/cd/E16655_01/server.121/e17636/create.htm#i1009290
    Creating a Default Temporary Tablespace
    The DEFAULT TEMPORARY TABLESPACE clause of the CREATE DATABASE statement creates a default temporary tablespace for the database. Oracle Database assigns this tablespace as the temporary tablespace for users who are not explicitly assigned a temporary tablespace.
    You can explicitly assign a temporary tablespace or tablespace group to a user in the CREATE USER statement. However, if you do not do so, and if no default temporary tablespace has been specified for the database, then by default these users are assigned the SYSTEM tablespace as their temporary tablespace. It is not good practice to store temporary data in the SYSTEM tablespace, and it is cumbersome to assign every user a temporary tablespace individually. Therefore, Oracle recommends that you use the DEFAULT TEMPORARY TABLESPACE clause of CREATE DATABASE.
    You don't have to believe me or the docs.
    Try it yourself. That is the best way to learn. Post your results here for all to see.
    That is what that 12c doc says and what ALL of the docs for the versions before say. See for yourself. Here is the doc link for Oracle 7.3 so you can see the CREATE DATABASE systax yourself
    http://docs.oracle.com/cd/A57673_01/DOC/server/doc/SQL73/ch4a.htm#createdatabase
    Without a temp tablespace Oracle is forced to use the SYSTEM tablespace for the temporary.
    These are the STANDARD ways:
    1. Create PDB with a temporary tablespace.
    2. Use the DBCA with a custom template
    3. Create your own PDB seed database without a temp tablespace and then clone your seed to create other PDBs without a temp tablespace
    4. Use CREATE DATABASE to create a DB without a temp tablespace and then plug it in to your CDB root container.
    Those are ALL standard methods. The last three result in PDBs withoug a temp tablespace.
    #1 is what you should be using.
    1. Create PDB with a temporary tablespace.
    2. Shrink/resize the temp tablespace down to a minimum if you want
    3. Assign the users to the CDB temp tablespace if you don't want them using the PDB temp
    I would appreciate if you only answer to questions if you have tested it or have a precise answer to it!
    I have done BOTH of those things. Your failure to recognize that is NOT my problem.
    I have created a PDB without a temp tablespace using DBCA and a custom template.
    I have also created a PDB without a temp tablespace by using the historical standard method of CREATE DATABASE  without a temp tablespace and then plugging it into the CDB and a PDB.
    It is YOUR responsibility to RTFM and YOUR responsibility to actually put your fingers on the keyboard and try things.
    The forum is NOT a coding service so you have no right to expect someone to write code for you and no right to get upset if they don't.
    dbca doesn't use any other commands than the one's I've already tried!
    Your reality is different than Oracle's. Support your reality with some facts.
    I just created a PDB (create pluggable database) and no wonder that one comes with a temp tablespace.
    I don't see where you posted ANYTHING that shows:
    1. exactly WHAT you did
    2. exactly HOW you did it
    3. exactly what results you got.
    If you want help with the code or a process you are using you have to POST that code or process.
    We can NOT see your computer screen to see what screens you see or what entries you make.
    Complain about the messenger all you want.
    But you will NOT be successful with 12c if you refuse to RTFM and refuse to try things yourself. Making unsubstantiated statements or trying to attack me may make you feel better but you won't learn anything from it.

  • Drop Temp Tablespace

    DB 10.2.0.4
    AIX 5.2
    PROD
    I am trying to drop temp tablespace as below command. It is running since nine hours I am not understand why it is taking too much time. FYI I have created a new temp and assigned to default temporary tablespace. Even I connected with new session and run “drop tablespace temp” it is also running since one hour. Suggest me.
    DROP TABLESPACE temp INCLUDING CONTENTS AND DATAFILES;
    Thanks

    user11969485 wrote:
    FYI Holder session is "oracle@devdb (SMON)"
    Edited by: user11969485 on Jan 7, 2012 12:49 AMYes, Looks like you hitting a BUG.
    Check this note Bug 3833893: SMON GETS "TT ENQUEUE" OF TEMP IF DATEFILE OF TEMP DOESN'T EXIST
    It saying to drop files from mount status. Lets try :)
    Keep Close the Threads, So it meaningful as those answered.
    user11969485      Newbie
    Handle:      user11969485
    Status Level:      Newbie (10)
    Registered:      Oct 27, 2009
    Total Posts:      302
    Total Questions:      66 (57 unresolved)
    Edited by: CKPT on Jan 7, 2012 2:36 PM

  • Temp Tablespace space needed to create an index of 52GB - preventing 01652

    Hi,
    I've seen quiet a few threads on the subject, but could not find a clear (to me) answer on the subject.
    We have a huge table made by 30/40 partitions of roughly 20M records each (each record being about 1k of size), overall 800GB.
    The index we already have shows:
      1* select sum(bytes/1024/1024)  from dba_segments where segment_name like 'CALL_LOG_I0'
    SQL> /
    SUM(BYTES/1024/1024)
                   52088
    so that I assume it's 52GB in size. Since we have to create another very similar one I would assume the size would be similar.
    Command would be:
    create index call_log_i0_new on call_log (msisdn, generation_timestamp, cdr_reference_number, Multiple_AMA_Sequence_Number) NOLOGGING online;
    Tried the NOSORT option but it's not compatible with the online option.
    After a while the TEMP tablespace got filled up (we have about 20GB space in there).
    My question is if I need to have a temp tablespace at least as big as the index size (52GB) to let the index be built online.
    Thanks in advance !
    Cheers,
    Mike

    Thanks to all, found useful information in Metalink following your suggestions:
    You need to add more space to the tablespace where the index is created.
    A possible option to reduce sort space usage is to use the NOSORT option.
    Your table contains 66 million rows. The average row length is
    50-60 bytes and you are indexing 4 of 5 columns in the table.
    Example space calculation:
    66 million rows * 50 (avg row length) = 3.3 gig of data
    Rule of thumb:
    upper bound for sort (not guaranteed) is 3 times data_
    = about 10 gig of sort space needed
    These numbers are scaring since assume that I may need much more space than the index size (about 3x) which is something we cannot afford. Will go with the NOSORT option once the system is brought down and we could skip the online option.
    Thanks to all !
    Mike

  • Releasing TEMP tablespace segments

    Hi All
    Due to some SQL Queries, the temp tablespace is getting full. I want to release the space in the TEMP tablespace by a command. I know SMON does it (correct me). I have Oracle 9i, and the TEMP tablespace is a local tablespace.
    Any help will be appreciated.
    Thanks
    Bala

    temp segment is full may be normal...you need to add some space! well, you can't clean the temp segments when it is used by some running process! smon allocates and deallocates space in temp segment, users doesn't have any control!! how did you define the temp segments...temporary or permanent? and why smon is not doing the cleanup...couple of stack dump of smon would be helpful. you can use any debugger in your system to dump the stack.
    Thanks,
    G

  • Creating a Global Temporary Table on non-default TEMP tablespace.

    Hello ,
    I am using Oracle 11g.
    I have a procedure which create global temporary tables for its functionality. As the data which is going in the global temporary table , mean the data which is going in the default TEMP tablesapce is too huge ..... billions of rows..
    So what i want to do is , I want to create the global temporary table in another TEMP2 tablespace ( which is not the default one) so the load of billions of rows of data will be shifted to TEMP2. The default TEMP tablespace will not be affected and it can be used for other transactions.
    Is this possible. Can i shift the global temporary table from TEMP( Default temp tablespace) to TEMP2 ( the non-default temp tablespace) ????
    Please guide me with proper solutions and examples ....
    Thanks in advance ..

    DBA4 wrote:
    Hello ,
    I am using Oracle 11g.
    I have a procedure which create global temporary tables for its functionality. As the data which is going in the global temporary table , mean the data which is going in the default TEMP tablesapce is too huge ..... billions of rows..
    So what i want to do is , I want to create the global temporary table in another TEMP2 tablespace ( which is not the default one) so the load of billions of rows of data will be shifted to TEMP2. The default TEMP tablespace will not be affected and it can be used for other transactions.
    Is this possible. Can i shift the global temporary table from TEMP( Default temp tablespace) to TEMP2 ( the non-default temp tablespace) ????
    Global temporary tables are instantiated in the temporary tablespace of the schema that inserts the data - not into "the default" temporary tablespace.
    Assume Schema1 creates a GTT and grants all on that table to schema2
    Assume schema1 also creates a procedure (authid owner, the default) to insert data into the GTT and grants execute on the procedure to schema2
    If schema2 executes: insert into schema1.gtt, the data will appear in the temporary tablespace of schema2
    If schema2 executes: execute schema1.procedure, the data will appear in the temporary tablespace of schema1
    So if you want to protect the "normal" temporary tablespace, you could just create a special temporary tablespace for the owner of the procedure.
    Regards
    Jonathan Lewis

  • TEMP tablespace getting full while inserting a CLOB in Trigger

    We have a Oracle 10g (10.2.0.4.0) DB on a Solaris 9 box which also runs our J2EE web-service application on Weblogic 8sp6 server.
    We get around 220K web-service requests from upstream callers daily to insert data in the main table, say TABLE1, which has daily partitions on a date column. This table has around 21 columns out of which 1 is a CLOB column.
    Now this table has an AFTER INSERT trigger which calls a package procedure to insert the same record into another table, say TABLE2.
    From Java application insert statement in executed in below format using a weblogic jdbc connection pool :
    INSERT INTO TABLE1(COLUMN1, COLUMN2, ........., CLOB_COLUMN,........, COLUMN21) VALUES (:1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13, :14, :15, :16, :17, :18, :19, :20);
    Clob object is prepared in application using ojdbc14.jar.
    We are observing a strange issue here. The TEMP tablespace utilization keeps on growing as more and more inserts are executed by application and after ~125K inserts the TEMP tablespace gets full and we start getting ORA-01652 error.
    On further analysis we could see that there are only 7-10 session being maintained but as more and more inserts happen TEMP tablespace utilization goes on increasing for each of these sessions.
    When we tried with inserting just few records and then watching the session details in v$session_wait then we could see that it is in INACTIVE state and waiting for the event ‘SQL*Net message from client’. This does not seem correct as the session has successfully inserted the data and committed the transaction and we can see the data in the tables as well.
    The confusing thing here is when we modify the trigger to pass blank string('' ) instead of the CLOB column to TABLE2 then this issue does not occur. All 200K records are inserted properly and TEMP tablespace utilization also keep always below 1%.
    Can you please help us in solving this issue. Is this related to any oracle issue?
    Inside the package we have tried using DBMS_COPY statement to copy the CLOB column after insert but still same result.
    Code for reference:
    Trigger:
    =====================================
    CREATE OR REPLACE TRIGGER trg
    AFTER INSERT OR UPDATE
    ON TABLE1
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    BEGIN
    IF (:NEW.date_col > SYSDATE - 2)
    THEN
    IF (:NEW.cat IN (1001, 1002))
    THEN
    pkg.process_change
         (:NEW.COLUMN1,
              :NEW.COLUMN2,
              :NEW.CLOB_COLUMN,
    FLAG
    END IF;
    END IF;
    END;
    =====================================
    Package:
    =====================================
    procedure PKG.Process_change(
    p_COLUMN1 number,
    p_COLUMN2 varchar2,
    p_CLOB_COLUMN clob,
    flag boolean
    ) is
    v_watermark pls_integer;
    v_type varchar2(1);
    begin
    if (flag) then
    v_type := 'U';
    else
    v_type := 'I';
    end if;
    select t_seq.nextval into v_watermark from dual;
    insert into TABLE2(
    COLUMN1 number,
    COLUMN2 varchar2,
    CLOB_COLUMN clob,
    watermark,
    dml_type
    )values (
    p_COLUMN1 number,
    p_COLUMN2 varchar2,
    p_CLOB_COLUMN clob,
    v_watermark,
    v_dml_type
    end;
    =====================================

    My first thought on reading your post is that not only are you using a database version that is now so old it is in extended support and even then not even the most recent patchset for it.
    The first thing I would do is move to 11gR2 and if you can't do that at least get to 10.2.0.5 and apply CLOB relevant patches as well.
    Same goes for your operating system. Solaris 9 is ancient: So move to 10 which has vastly improved memory management.
    To help you further it would be really valuable to know the table layout. For example is this a heap table or an IOT? Is it partitioned? Is this RAC? What size are the CLOBs? Are they stored in-line? Chunk size? etc.
    This page should start you down the right road:
    http://docs.oracle.com/cd/B19306_01/appdev.102/b14249/adlob_tables.htm#sthref204
    But I am also wondering why you would use a trigger to, as you say, "insert the same record into another table." This description is a poster child for "bad design."

Maybe you are looking for

  • My iweb website i posted through Fetch isn't working...

    i posted my iweb website using Fetch to my godaddy.com web address, but it's not working. it keeps coming up with the "this page coming soon" page instead. is there a certain folder i'm supposed to post it to? do i need to delete the "this page comin

  • Safari can't handle gif 89a? Workaround?

    Back in 1998 I made some GIF 89a animations to aid some students and they worked fine. A few years later the animations stopped working. Now they work in Firefox but NOT in Safari 2.0.4 (419.3) My guess is that Safari only support animated GIFs if th

  • 10.5.1 broke wireless printing to HP 6210 All In One

    That's my educated guess. I got a MacBook in Nov. last year. It came with 10.5 pre-installed. I disconnected my existing HP 6210 All In One from my wife's blueberry iMac and plugged it into the USB port on our Airport Express. Wireless printing worke

  • How to block Windows update services?

    We have a need to prevent windows update traffic to flow thru our network on certain dates. Basically this type of traffic will clog our mpls bandwidth preventing other type of traffic to flow. We are using up to some part QoS on out routers but it n

  • How to upload data in infotype 0025 (Appraisals)

    I want to make an upload program for infotype 0025 (Appraisals). The program will upload the data in 'Potentials' but I cannot make a recording work in it. Each time the system posts the data into next row and recording does not work since the line n