Statements stuck in Temporary tablespaces

Hi!
I'm facing an intriguing issue with my database.
There are some statements (selects and updates) that seems to be stucked in my TEMP tablespace. The sessions are inactive, but they are still showing on v$sort_usage and filling up my temp tablespace.
Any ideas of how I should proceed?
Tks a lot,
- Glaucia
Edited by: glauciams on Oct 22, 2009 6:32 AM

Oracle will continue to hold temporary segments with sessions even when the session has gone idle or really no longer needs the segment(s). I assume the developers felt that if the session needed a large temp area to begin with it will need it again so why release it? It can be re-allocated on-the-fly to another session except in some earlier 9i releases where there are some bugs if the tablespace it locally managed and a temp file.
Are you running out of temp or did you just notice this behavior?
Mike

Similar Messages

  • Who fills temporary tablespace?

    Hello,
    a short question. How can I select who/which statement fills the temporary tablespace?
    Thanks!

    Hi,
    You can try use these SQL's below:
    To monitor tempspace eating by session
    select a.sid,b.blocks from v$session a , v$sort_usage b
    where a.saddr=b.session_addr;
    To monitor tempspace eating by SQL
    select b.sql_id,a.sql_text,b.blocks from v$sql a, v$sort_usage b
    where a.sql_id=b.sql_id;Cheers
    [url http://eduardolegatti.blogspot.com]Legatti

  • Using temporary tablespace for sort in select statement without spacifying

    how can i use some particular temporary tablespace in select statement for sording without allocating any temporary tablespace to that user

    Try to set for the current session the in memory sorting space to 0 before running your query:
    SQL> alter session set sort_area_size = 0;The query should use the temporary tablespace.
    Message was edited by:
    Pierre Forstmann

  • Shrinking a Locally Managed Temporary Tablespace

    So, even thoguh the documentation is pretty clear about how to use this feature, I cannot get it to do what I expect it to do for me.
    And that would be shrinking the tempfile ;)
    Now lets face it, I have a large tempfile and want to resize it without restarting the database:
    C:\Users\Administrator>sqlplus / as sysdba
    SQL*Plus: Release 11.2.0.2.0 Production on Di Nov 20 05:49:59 2012
    Copyright (c) 1982, 2010, Oracle. All rights reserved.
    Connected to:
    Oracle Database 11g Release 11.2.0.2.0 - 64bit Production
    SQL> select file_name
    , ceil(bytes / 1024 / 1024) "size MB"
    from dba_temp_files
    FILE_NAME size MB
    R:\MXVC01\TEMP01.DBF 31,231
    SQL> select su.username
    , ses.sid
    , ses.serial#
    , su.tablespace
    , ceil((su.blocks * dt.block_size) / 1048576) MB
    from v$sort_usage su
    , dba_tablespaces dt
    , v$session ses
    where su.tablespace = dt.tablespace_name
    and su.session_addr = ses.saddr
    USERNAME SID SERIAL# TABLESPACE MB
    VPXADMIN 15 15 TEMP 14
    VPXADMIN 17 5 TEMP 1,203
    VPXADMIN 17 5 TEMP 1
    VPXADMIN 18 3 TEMP 7
    VPXADMIN 19 3 TEMP 1
    VPXADMIN 144 3 TEMP 1
    VUMADMIN 156 2597 TEMP 1
    7 rows selected.
    Or this one:
    SQL> select tablespace_size/1024/1024 "tablespace_size mb"
    , allocated_space/1024/1024 "allocated_space mb"
    , free_space/1024/1024 "free_space mb"
    from dba_temp_free_space
    tablespace_size mb allocated_space mb free_space mb
    31230,9922 1228,99219 30002
    Documetation from here: http://docs.oracle.com/cd/E11882_01/server.112/e25494/tspaces007.htm#ADMIN12353
    +"Shrinking a Locally Managed Temporary Tablespace+
    +Large sort operations performed by the database may result in a temporary tablespace growing and occupying a considerable amount of disk space. After the sort operation completes, the extra space is not released; it is just marked as free and available for reuse. Therefore, a single large sort operation might result in a large amount of allocated temporary space that remains unused after the sort operation is complete. For this reason, the database enables you to shrink locally managed temporary tablespaces and release unused space.+
    +You use the SHRINK SPACE clause of the ALTER TABLESPACE statement to shrink a temporary tablespace, or the SHRINK TEMPFILE clause of the ALTER TABLESPACE statement to shrink a specific tempfile of a temporary tablespace. Shrinking frees as much space as possible while maintaining the other attributes of the tablespace or tempfile. The optional KEEP clause defines a minimum size for the tablespace or tempfile.+
    +Shrinking is an online operation, which means that user sessions can continue to allocate sort extents if needed, and already-running queries are not affected.+
    +The following example shrinks the locally managed temporary tablespace lmtmp1 to a size of 20M.+
    +ALTER TABLESPACE lmtemp1 SHRINK SPACE KEEP 20M;+
    +The following example shrinks the tempfile lmtemp02.dbf of the locally managed temporary tablespace lmtmp2. Because the KEEP clause is omitted, the database attempts to shrink the tempfile to the minimum possible size.+
    +ALTER TABLESPACE lmtemp2 SHRINK TEMPFILE '/u02/oracle/data/lmtemp02.dbf';"+
    OK, lets do it:
    SQL> alter tablespace temp shrink tempfile 'R:\MXVC01\TEMP01.DBF';
    alter tablespace temp shrink tempfile 'R:\MXVC01\TEMP01.DBF'
    ERROR at line 1:
    ORA-03214: File Size specified is smaller than minimum required
    It seems there is a bug? Should I report it, or is it the expected behaviour?
    Now lets try this one:
    SQL> alter tablespace temp shrink tempfile 'R:\MXVC01\TEMP01.DBF' keep 2048M;
    Tablespace altered.
    SQL> select file_name
    , ceil(bytes / 1024 / 1024) "size MB"
    from dba_temp_files
    FILE_NAME size MB
    R:\MXVC01\TEMP01.DBF 31,231
    So .... this lasts about *10 minutes*, and nothing changes?
    It seems there is a bug? Should I report it, or is it the expected behaviour?
    Could someone enlighten me, what this SHRINK is actually doing?
    Is it worth to report this as bug, if not a software bug it is at least a documentation bug because it doesn't mention under which conditions it is working?
    P.S.: OMG the posting looks terrible, who's the one to blame for this forum software where it is not possible to use fixed size fonts, or format paragraphs as code, or what about the fact that the forum software is using default SQLPlus output as META for some graphical lines?
    Isn't this the forum for Oracle Database users?
    Edited by: Gerrit Haase on 20.11.2012 13:44

    So, you are kidding with me? No? Who are you?
    How can I block users here? Is there a moderator present at this forum?
    Maybe you read my initial post again?
    I didn't look at the wrong place.
    I reported you for general abuse.
    SQL> define
    DEFINE _DATE           = "20.11.12" (CHAR)
    DEFINE CONNECTIDENTIFIER = "MXVC01" (CHAR)
    DEFINE _USER           = "SYS" (CHAR)
    DEFINE _PRIVILEGE      = "AS SYSDBA" (CHAR)
    DEFINE SQLPLUSRELEASE = "1102000200" (CHAR)
    DEFINE _EDITOR         = "Notepad" (CHAR)
    DEFINE OVERSION = "Oracle Database 11g Release 11.2.0.2.0 - 64bit Production" (CHAR)
    DEFINE ORELEASE = "1102000200" (CHAR)
    SQL> SELECT * FROM dba_temp_free_space;
    TABLESPACE_NAME TABLESPACE_SIZE ALLOCATED_SPACE FREE_SPACE
    TEMP 3,2748E+10 1306517504 3,1443E+10
    SQL> select TABLESPACE_SIZE/power(2,20), ALLOCATED_SPACE/power(2,20), FREE_SPACE/power(2,20) from dba_temp_free_space ;
    TABLESPACE_SIZE/POWER(2,20) ALLOCATED_SPACE/POWER(2,20) FREE_SPACE/POWER(2,20)
    31230,9922 1245,99219 29986
    SQL> ALTER TABLESPACE temp SHRINK SPACE;
    Tablespace altered.
    SQL> select TABLESPACE_SIZE/power(2,20), ALLOCATED_SPACE/power(2,20), FREE_SPACE/power(2,20) from dba_temp_free_space ;
    TABLESPACE_SIZE/POWER(2,20) ALLOCATED_SPACE/POWER(2,20) FREE_SPACE/POWER(2,20)
    31230,9922 1244,99219 *29986*
    R:\mxvc01>dir temp
    Volume in drive R is Disk_R
    Volume Serial Number is 248B-61D4
    Directory of R:\mxvc01
    20.11.2012 08:09 32.748.077.056 TEMP01.DBF
    1 File(s) 32.748.077.056 bytes
    0 Dir(s) 8.259.297.280 bytes free
    SQL> alter tablespace temp shrink tempfile 'R:\mxvc01\TEMP01.DBF';
    alter tablespace temp shrink tempfile 'R:\mxvc01\TEMP01.DBF'
    ERROR at line 1:
    ORA-03214: File Size specified is smaller than minimum required
    *It clearly says that there is 29986 MB Space FREE and the above shrink space changes nothing and so does shrink tempfile:*
    SQL> alter tablespace temp shrink tempfile 'R:\mxvc01\TEMP01.DBF';
    alter tablespace temp shrink tempfile 'R:\mxvc01\TEMP01.DBF'
    ERROR at line 1:
    ORA-03214: File Size specified is smaller than minimum required
    SQL> alter tablespace temp shrink tempfile 'R:\mxvc01\TEMP01.DBF' KEEP 20M;
    Tablespace altered.
    R:\mxvc01>dir temp
    Volume in drive R is Disk_R
    Volume Serial Number is 248B-61D4
    Directory of R:\mxvc01
    20.11.2012 08:24 32.748.077.056 TEMP01.DBF
    1 File(s) 32.748.077.056 bytes
    0 Dir(s) 8.259.280.896 bytes free
    *... nothing changes, the tempfile isn't smaller now ...*

  • Rapid and Huge growth of of used space of temporary tablespace

    Hi,
    Have a query (select) that run quick (no more than 10 seconds).
    As soon I insert the data into a temporary table or even on physical table, the temporary table used space starts to growth very fast. The used space is totally used and the query crash since e reach the limit (65GB), or even more if I add more table files to temporary tablespace!
    The problem also happen only if the period (dates) is one year (2013). If the period is the first trimestre of 2013 (same amount of data), the problem does not happen!!
    I also confirm that on another instance ( a test one), even with less resources this ORACLE behavior do not happen. I confirm differente execution plan queries, between the two instances .
    What I really do not understant is the behavior of the ORACLE with the huge and rapid growth!!!
    Any one experiment such a similiar situation?
    Thanks in advance,Rui
    Plan
    INSERT STATEMENT ALL_ROWSCost: 15.776 Bytes: 269 Cardinality: 1
    28 LOAD TABLE CONVENTIONAL MIDIALOG_OLAP.MED_INVCOMP_FACTTMP_BEFGROUPBY
    27 FILTER
    26 NESTED LOOPS
    24 NESTED LOOPS Cost: 15.776 Bytes: 269 Cardinality: 1
    22 NESTED LOOPS Cost: 15.775 Bytes: 255 Cardinality: 1
    19 NESTED LOOPS Cost: 15.774 Bytes: 205 Cardinality: 1
    17 NESTED LOOPS Cost: 15.773 Bytes: 197 Cardinality: 1
    14 NESTED LOOPS Cost: 15.770 Bytes: 180 Cardinality: 1
    11 NESTED LOOPS Cost: 15.767 Bytes: 108 Cardinality: 1
    9 HASH JOIN Cost: 15.757 Bytes: 8.346.500 Cardinality: 83.465
    7 HASH JOIN Cost: 13.407 Bytes: 6.345.012 Cardinality: 83.487
    5 HASH JOIN Cost: 11.163 Bytes: 5.010.550 Cardinality: 100.211
    3 HASH JOIN Cost: 5.642 Bytes: 801.288 Cardinality: 22.258
    1 INDEX RANGE SCAN INDEX MIDIALOG.IX_INSCOMP_DTCEIDICIDLCPECIDOP Cost: 120 Bytes: 489.676 Cardinality: 22.258
    2 INDEX FAST FULL SCAN INDEX (UNIQUE) MIDIALOG.IX_LINHACOMPRADA_IDLCIDOPSEQ Cost: 5.463 Bytes: 123.975.530 Cardinality: 8.855.395
    4 INDEX FAST FULL SCAN INDEX (UNIQUE) MIDIALOG.IX_LINHACOMPRADA_IDLCIDOPSEQ Cost: 5.463 Bytes: 123.975.530 Cardinality: 8.855.395
    6 TABLE ACCESS FULL TABLE MIDIALOG.ITEM_AV Cost: 1.569 Bytes: 6.963.736 Cardinality: 267.836
    8 TABLE ACCESS FULL TABLE MIDIALOG.ITEM_AV Cost: 1.572 Bytes: 7.713.672 Cardinality: 321.403
    10 INDEX UNIQUE SCAN INDEX (UNIQUE) MIDIALOG.IX_BOFINALBO_IDBOIDFINALBO Cost: 0 Bytes: 8 Cardinality: 1
    13 TABLE ACCESS BY INDEX ROWID TABLE MIDIALOG.INSERCAO_COMPRADA Cost: 3 Bytes: 72 Cardinality: 1
    12 INDEX RANGE SCAN INDEX (UNIQUE) MIDIALOG.IX_INSCOMPRADA_IDLCDATAPECAINS Cost: 2 Cardinality: 1
    16 TABLE ACCESS BY INDEX ROWID TABLE MIDIALOG.INSERCAO_ITEMFACTURA Cost: 3 Bytes: 17 Cardinality: 1
    15 INDEX RANGE SCAN INDEX MIDIALOG.IX_INSITFACT_INSCOMPRADA Cost: 2 Cardinality: 1
    18 INDEX RANGE SCAN INDEX (UNIQUE) MIDIALOG.UQ_ITEMFACTURA_IDITF_IDFACT Cost: 1 Bytes: 8 Cardinality: 1
    21 TABLE ACCESS BY INDEX ROWID TABLE MIDIALOG.FATURA Cost: 1 Bytes: 50 Cardinality: 1
    20 INDEX UNIQUE SCAN INDEX (UNIQUE) MIDIALOG.PK_FATURA Cost: 0 Cardinality: 1
    23 INDEX UNIQUE SCAN INDEX (UNIQUE) MIDIALOG.PK_TIPO_ESTADO Cost: 0 Cardinality: 1
    25 TABLE ACCESS BY INDEX ROWID TABLE MIDIALOG.TIPO_ESTADO Cost: 1 Bytes: 14 Cardinality: 1
    Edited by: rr**** on 19/Fev/2013 15:25

    I run the select with sucess, no more that 1 minute from on year of data. Few temporary used space used.
    As soon I plug the insert (global temporary table, also experiment with physical table) the used space of temporary table space start to grow crazy!!
    insert into midialog_olap.med_invcomp_facttmp_befgroupby
    select fac.numefatura,
    fac.codpessoa,
    fac.dtemiss,
    tef.nome as estado_factura,
    opsorig.demid,
    opsorig.anoplano,
    opsorig.numplano,
    opsorig.numplanilha,
    ops.nome as ordem_publicidade,
    ops.external_number as numero_externo,
    ops.estado,
    lic.seq,
    inc.data,
    inc.peca,
    fac.id_versao_plano,
    fac.ano_proforma || '.' || fac.numrf as num_proforma,
    iif.tipo_facturacao,
    opsorig.codveiculo as id_veiculo,
    opsorig.codfm as id_fornecedor_media,
    icorig.chkestado as id_estado_checking,
    0 as percentagem_comissao_agencia,
    0 as valor_pbv,
    0 as valor_stxtv,
    0 as valor_ptv,
    0 as valor_odbv,
    0 as valor_pbbv,
    0 as valor_dnv,
    0 as valor_pbnv,
    0 as valor_stxv,
    0 as valor_pbtv,
    0 as valor_dav,
    0 as valor_plv,
    0 as valor_odlv,
    0 as valor_pllv,
    0 as valor_ca,
    0 as valor_trv,
    0 as valor_txv,
    0 as valor_base_facturacao,
    decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
    decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
    inc.total_pb_compra * fac.percentagem_facturada / 100))
    as valor_pbc,
    decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
    decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
    inc.total_stxt_compra * fac.percentagem_facturada / 100))
    as valor_stxtc,
    decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
    decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
    inc.total_pt_compra * fac.percentagem_facturada / 100))
    as valor_ptc,
    decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
    decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
    inc.total_odb_compra * fac.percentagem_facturada / 100))
    as valor_odbc,
    decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
    decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
    inc.total_pbb_compra * fac.percentagem_facturada / 100))
    as valor_pbbc,
    decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
    decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
    inc.total_dn_compra * fac.percentagem_facturada / 100))
    as valor_dnc,
    decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
    decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
    inc.total_pbn_compra * fac.percentagem_facturada / 100))
    as valor_pbnc,
    decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
    decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
    inc.total_stx_compra * fac.percentagem_facturada / 100))
    as valor_stxc,
    decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
    decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
    inc.total_pbt_compra * fac.percentagem_facturada / 100))
    as valor_pbtc,
    decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
    decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
    inc.total_da_compra * fac.percentagem_facturada / 100))
    as valor_dac,
    decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
    decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
    inc.total_pl_compra * fac.percentagem_facturada / 100))
    as valor_plc,
    decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
    decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
    inc.total_odl_compra * fac.percentagem_facturada / 100))
    as valor_odlc,
    decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
    decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
    inc.total_pll_compra * fac.percentagem_facturada / 100))
    as valor_pllc,
    decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
    decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
    inc.total_transcricoes * fac.percentagem_facturada / 100))
    as valor_trc,
    decode(ops.estado, :WKFOPR_BOOKINGORDER_CANCELED, 0,
    decode(iif.tipo_facturacao, :BILLING_TYPE_ONLYCOMISSION, 0,
    inc.total_tx_compra * fac.percentagem_facturada / 100))
    as valor_txc,
    --nvl((select cfm.total_comprado
    -- from fin_custos_facturados_media cfm
    -- where cfm.id_factura = fac.id_factura and
    - -- cfm.id_op = ops.id_op
    -- ), 0) / opsorig.number_of_bought_insertions as custos_associados,
    0 as custos_associados,
    fac.iss as percentagem_iva,
    fac.percentagem_facturada,
    fac.currency_exchange as taxa_cambio,
    iif.associated_code as insertions_associated_code
    from fatura fac, item_fatura itf, insercao_itemfactura iif,
    insercao_comprada icorig, linha_comprada lcorig, item_av opsorig,
    med_bookingorder_finalbo opfin,
    insercao_comprada inc,
    linha_comprada lic, item_av ops,
    --veiculo vei,
    tipo_estado tef
    where fac.id_factura = itf.id_factura and
    itf.id_itemfactura = iif.id_itemfactura and
    iif.id_ic = icorig.id_ic and
    icorig.id_lc = lcorig.id_lc and
    lcorig.id_op = opsorig.id_op and
    opsorig.id_op = opfin.id_booking_order and
    opsorig.number_of_bought_insertions > 0 and
    opfin.id_final_booking_order = ops.id_op and
    -- ops.id_op = (
    -- select max(ops.id_op)
    -- from item_av ops
    -- start with ops.id_op = opsorig.id_op
    -- connect by prior ops.id_opsubstituicao = ops.id_op) and
    ops.id_op = lic.id_op and
    lic.seq = lcorig.seq and
    lic.id_op = inc.id_op and
    lic.id_lc = inc.id_lc and
    inc.data = icorig.data and
    inc.peca = icorig.peca and
    --opsorig.codveiculo = vei.codveiculo and
    fac.estado = tef.estado and
    fac.estado != 305 and
    ops.estado != 223 and
    iif.tipo_facturacao != 'SO_CA' and
    icorig.data between :dtBeginDate and :dtEndDate and
    (fac.codagenciafat = :iIdAgency or :iIdAgency is null);

  • Temporary tablespace size

    Hi,
    I have a doubt regarding temporary tablespace. Oracle 9.2.0.5
    When I create the default tablespace temp I see it growing and growing during some days until it reaches the maximum size and then it give the error ORA-01652: unable to extend temp segment by 128 in tablespace TEMP
    but monitoring the v$sort_segment I see one or 2 users logged and using the temp.
    So my doubt is: what I have to do to find the BEST size for my temp tablespace. which queries is the recomended one to see the temp segments being used ?
    Thank you

    See http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96521/tspaces.htm#9566
    To improve the concurrence of multiple sort operations, reduce their overhead, or avoid Oracle space management operations altogether, create temporary tablespaces. A temporary tablespace can be shared by multiple users and can be assigned to users with the CREATE USER statement when you create users in the database.
    Within a temporary tablespace, all sort operations for a given instance and tablespace share a single sort segment. Sort segments exist for every instance that performs sort operations within a given tablespace. The sort segment is created by the first statement that uses a temporary tablespace for sorting, after startup, and is released only at shutdown. An extent cannot be shared by multiple transactions.
    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.

  • Temporary tablespace

    Our temporary tablespace doesn't empty itself after a commit, rollback or end-session. Can't find the reason why not.
    Next size is set to 256K but we get error messages that the temp tablespace is unable to extend next size with 128K which is in fact the next size of all rollbacks segs.
    1. Does a rollback segment empties itself into the temporary tablespace?
    2. How can I change the settings so that the temporary tablespace empties itself?
    Thanks Henry

    Hi
    The first answer of your question is not fully correct. If you
    mark your tablespace 'temporary' it is not used for storing
    database objects. It is used onle for sort operations. Oracle
    recomend to set equal initial and next segments for this
    tablespace and pctincrease=0. You can see recomendation for this
    in Oracle Server Tunning. A good size for segments is 2 times of
    sort area size and some overhead. But if your users execute many
    statements needed big sorts and same time you will need big
    temporary tablespace.
    Regards

  • Temporary tablespace questions

    I have an Oracle 9.2.0.1.0 database running on a Windows 2000 server. I'm encountering several problems with its temporary tablespace. Here is how the temporary tablespace is created:
    create database testdb
    datafile 'd:\oradb\testdb\datafiles\testdbsys1.dbf'
    size 200M AUTOEXTEND ON NEXT 10M
    default temporary tablespace temporary
    tempfile 'd:\oradb\testdb\datafiles\tmp1.dbf'
    size 16400K reuse autoextend on next 16400K
    undo tablespace undotbs
    datafile 'd:\oradb\testdb\datafiles\testdbrbs1.dbf'
    size 100M reuse autoextend on next 10M maxsize unlimited;
    Questions:
    1- Despite the fact that the temporary tablespace datafile is specified "autoextend on", it autoextends up to 4 Gb then it fails. The exact error is ORA-0652: unable to extend temp segment by 64 in tablespace TEMPORARY. If I manually extend it beyond 4 Gb, everything works fine. Is this a bug or is it something I do wrong ? If so, what should I do to correct this ?
    2- I can't figure out what statement of my application makes the temporary tablespace grow so big. I looked at all the trace files in UDUMP and I noticed it's always the same statement that is logged when the "autoextend" error occurs. But when I run the statement on its own in SQLPlus, nothing special happens to the temporary tablespace. What is the best way to track what statement uses what resources of the temporary tablespace ?
    3- I don't know if this is what happens, but it looks like space isn't reused in the temporary tablespace. Is this possible ? If so, how can I tell Oracle to reuse it ?
    Thanks.

    1-You can try to modify the maxsize for datafaile to UNLIMITED. I am not sure it shall work, but it's worth a try
    2-Probably it's a statement that uses an order by on a large result set
    3-You can try to force the wakeup of SMON process that would free the unused extents of temporary tablespace.
    Try http://www.ixora.com.au/tips/admin/stray_temp.htm
    There is also a script to force the wakeup of smon

  • Problem on temporary tablespace

    Hi all,
    I created the temporary tablespace with following command;
    create temporary tablespace rbitemp
    tempfile 'E:\ORACLE\ORADATA\RBI\RBItemp.tmp' size 100m
    autoextend on next 1m maxsize 2000m;
    while running the query i received the error
    ORA-01652: unable to extend temp segment by 256 in tablespace RBITEMP
    Then I add tempfile , now still I receiving the same error.
    Thanks in advance.

    Hi,
    This tablespace is only for rbi user.
    query is :
    select distinct trim(wrk.bd_alcd) as ALCD, wrk.bd_typecd as TypeCD, wrk.bd_forcd as FORCD, wrk.bd_curcd as CURCD,
    wrk.bd_councd as COUNCD, wrk.bd_sectcd as SECCD,
    wrk.bd_matcd as MATCD, wrk.bd_c_u_cd as C_U_CD, wrk.bd_s_u_cd as S_U_CD,
    0 as Org_FCBal,0 as ORG_Bal,case when wrk.bd_type='O' then wrk.bd_fc_bal else 0 end as Main_FCBal,
    case when wrk.bd_type='O' then (wrk.bd_fc_bal * nvl(exchg.cer_exchangerate, 1)) else 0 end as main_Bal,
    wrk.bd_rs_int,wrk.bd_rs_bal,wrk.bd_fc_int,wrk.bd_fc_bal,
    ' ' as TrackChangs
    from ibs_work_bankdata wrk inner join ibs_org_bankdata org ON org.bd_yrqtr = wrk.bd_yrqtr and org.bd_bkcode=wrk.bd_bkcode and org.bd_forcd = wrk.bd_forcd
    and wrk.BD_YRQTR=20044 and wrk.BD_BKCODE ='000'
    and wrk.BD_ALCD = '51' and wrk.BD_FORCD ='IN' and wrk.BD_TYPECD = '11'
    left join ibs_currencymaster curmst on curmst.cur_code = wrk.bd_curcd
    left join ibs_currencyexchangerate exchg on exchg.cer_currencyid = curmst.cur_id
    and exchg.cer_yearqtr = 20051 and exchg.CER_ACTIVE=1 union select distinct trim(wrk.bd_alcd) as ALCD, wrk.bd_typecd as TypeCD, wrk.bd_forcd as FORCD, wrk.bd_curcd as CURCD,
    wrk.bd_councd as COUNCD, wrk.bd_sectcd as SECCD,
    wrk.bd_matcd as MATCD, ' ' as C_U_CD, ' ' as S_U_CD,
    0 as Org_FCBal,0 as ORG_Bal,case when wrk.bd_type='O' then wrk.bd_fc_bal else 0 end as Main_FCBal,
    case when wrk.bd_type='O' then (wrk.bd_fc_bal * nvl(exchg.cer_exchangerate, 1)) else 0 end as main_Bal,
    wrk.bd_rs_int,wrk.bd_rs_bal,wrk.bd_fc_int,wrk.bd_fc_bal,
    ' ' as TrackChangs
    from ibs_work_bankdata wrk inner join ibs_org_bankdata org ON org.bd_yrqtr = wrk.bd_yrqtr and org.bd_bkcode=wrk.bd_bkcode and org.bd_forcd = wrk.bd_forcd
    and wrk.BD_YRQTR=20044 and wrk.BD_BKCODE ='000'
    and wrk.BD_ALCD = '51' and wrk.BD_FORCD ='IN' and wrk.BD_TYPECD = '11' and wrk.bd_rs_bal>0
    left join ibs_currencymaster curmst on curmst.cur_code = wrk.bd_curcd
    left join ibs_currencyexchangerate exchg on exchg.cer_currencyid = curmst.cur_id
    and exchg.cer_yearqtr = 20051 and exchg.CER_ACTIVE=1 order by main_FCBal
    explain plan is:
    ****************SELECT STATEMENT, GOAL = CHOOSE               Cost=51     Cardinality=2     Bytes=314
    SORT UNIQUE               Cost=52     Cardinality=2     Bytes=314
    UNION-ALL                         
    TABLE ACCESS BY INDEX ROWID     Object owner=RBI     Object name=IBS_ORG_BANKDATA     Cost=2     Cardinality=204     Bytes=2856
    NESTED LOOPS               Cost=26     Cardinality=1     Bytes=157
    NESTED LOOPS OUTER               Cost=24     Cardinality=1     Bytes=143
    NESTED LOOPS OUTER               Cost=23     Cardinality=1     Bytes=93
    TABLE ACCESS BY INDEX ROWID     Object owner=RBI     Object name=IBS_WORK_BANKDATA     Cost=22     Cardinality=1     Bytes=52
    INDEX SKIP SCAN     Object owner=RBI     Object name=IBS_WORK_BANKDATA_IDX     Cost=7     Cardinality=1     
    TABLE ACCESS FULL     Object owner=RBI     Object name=IBS_CURRENCYMASTER     Cost=1     Cardinality=178     Bytes=7298
    TABLE ACCESS FULL     Object owner=RBI     Object name=IBS_CURRENCYEXCHANGERATE     Cost=1     Cardinality=19     Bytes=950
    INDEX RANGE SCAN     Object owner=RBI     Object name=IBS_ORG_BANKDATA_IDX     Cost=1     Cardinality=204     
    TABLE ACCESS BY INDEX ROWID     Object owner=RBI     Object name=IBS_ORG_BANKDATA     Cost=2     Cardinality=204     Bytes=2856
    NESTED LOOPS               Cost=26     Cardinality=1     Bytes=157
    NESTED LOOPS OUTER               Cost=24     Cardinality=1     Bytes=143
    NESTED LOOPS OUTER               Cost=23     Cardinality=1     Bytes=93
    TABLE ACCESS BY INDEX ROWID     Object owner=RBI     Object name=IBS_WORK_BANKDATA     Cost=22     Cardinality=1     Bytes=52
    INDEX SKIP SCAN     Object owner=RBI     Object name=IBS_WORK_BANKDATA_IDX     Cost=7     Cardinality=1     
    TABLE ACCESS FULL     Object owner=RBI     Object name=IBS_CURRENCYMASTER     Cost=1     Cardinality=178     Bytes=7298
    TABLE ACCESS FULL     Object owner=RBI     Object name=IBS_CURRENCYEXCHANGERATE     Cost=1     Cardinality=19     Bytes=950
    INDEX RANGE SCAN     Object owner=RBI     Object name=IBS_ORG_BANKDATA_IDX     Cost=1     Cardinality=204     
    please help.

  • Change temporary tablespace for session

    hi.
    i wonder if it's possible to change temporary tablespace for session in the way other then `alter user <user> temporary tablespace <tbc>'?

    Hi,
    Temporary tablespace is set at database level and user level. It is not set at the session level.
    The below is an extract from Oracle Docs for 10gR2
    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.You can specifically assign a temporary tablespace for the user but not for the session.
    regards,
    Vijayaraghavan K

  • EBS Database R12.1 temporary tablespace grow too quick??

    we have a EBS R12.1 database on Redhat LINUX server. Recently this database every day Temporary tablespace grow at least 1 GB. This database temporary tablespace (with two temp files) has been grow to 45 GB.
    Does anyone know what wrong?
    How to fix problem?

    I eventually figure out this temporary tablespace grow is cause by OEM.
    SQL statement is:
    /* OracleOEM */ SELECT end_time, status, session_key, session_recid, session_stamp, command_id, start_time, time_taken_
    display, input_type, output_device_type, input_bytes_display, output_bytes_display, output_bytes_per_sec_display
    FROM (SELECT end_time, status, session_key, session_recid, session_stamp, command_id, start_time,
    time_taken_display, input_type, output_device_type, input_bytes_display, output_bytes_di
    splay, output_bytes_per_sec_display FROM v$rman_backup_job_details ORDER BY end_time DESC) WHERE rownum
    = 1;
    ANyone know why this statement will take 30GB temporary space on EBS R12.1?
    Thanks.

  • When can I safely drop a temporary tablespace?

    I have a temporary tablespace in my database that I would like to get ride of.
    It was created with a statement similar to this:
    CREATE TEMPORARY TABLESPACE "TEMP"
    blah blah blah. . .
    I have checked dba_users and dba_extents. It is not used in either places.
    Is there anywhere else I should check prior to executing a "DROP TABLESPACE" command?
    Thank you,
    -Kris

    Query V$SORT_SEGMENT to check CURRENT_USERS for that TABLESPACE_NAME.
    If CURRENT_USERS is 0, it is not in use currently.
    Of course, query DBA_USERS to check TEMPORARY_TABLESPACE to see if it has been defined as the Temporary Tablespace for any user.
    If you have only created a Temporary Tablespace but not assigned it as the DEFAULT TEMPORARY TABLESPACE at the Database level or any user's Temporary Tablespace with an ALTER USER command, then it wouldn't be in use !
    Oracle starts using a Temporary Tablespace if either
    a. It is the DEFAULT TEMPORARY TABLESPACE
    b. It has been assigned as a User's Temporary Tablespace
    c. It is part of a Temporary Tablespace Group that has been assigned
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

  • Using temporary tablespaces to improve sort

    I have to do a select like "SELECT X FROM ABC ORDER BY X", where X is the primary key, thus, is indexed.
    There is more than 80000 records, and its taking more than 10 seconds to get the response....
    After creating a temporary tablespace, how do I do a Select using this tablespace?
    null

    Hi everybody
    Executing the script utlxplan.sql, and after the script explain.sql, I got the "route" done by the query I need.
    The table's name is CADIT. Primary Key cod_cp. The column used for the where clause is familia,indexed with the index IT1.
    In the first case, the query was
    SELECT COD_CP FROM CADIT
    WHERE FAMILIA='600' ORDER BY COD_CP
    The plan is this:
    OPERATION OPTIONS OBJECT_NAME
    SELECT STATEMENT
    SORT ORDER BY
    TABLE ACCESS BY INDEX ROWID CADIT
    INDEX RANGE SCAN IT1
    In the second case, the query was SELECT COD_CP FROM CADIT WHERE FAMILIA='600'
    The plan is this:
    OPERATION OPTIONS OBJECT_NAME
    SELECT STATEMENT
    TABLE ACCESS BY INDEX ROWID CADIT
    INDEX RANGE SCAN IT1
    In the third case, the query was SELECT COD_CP FROM CADIT ORDER BY COD_CP
    The plan is this:
    OPERATION OPTIONS OBJECT_NAME
    SELECT STATEMENT
    SORT ORDER BY
    TABLE ACCESS FULL CADIT
    Thus, looking at it, I concluded that no index is used for the SORT operation. Is that correct?
    I created another table, named cadit2, with the parameter ORGANIZATION INDEX at the end of the CREATE TABLE command. For that new table, the same query as the first one was much faster. Why?
    Thanks
    Guillermo Nudelman Hess

  • Parallel execution and temporary tablespaces

    I have a large long running (1 hour) data warehouse query in a materialized view.
    If I parallelize it using the parallel hint then I run out of temporary tablespace.
    I've tried creating a bunch of temporary tablespaces and putting them into a temp tablespace group but it still runs out of space. Parallel execution seems to use up way more temp tablespace than sequential execution.
    I know it is a very general question, but what are the tips for parallelizing a long running query with respect to temporary tablespace management?
    I've tried searching on the interwebs but I don't find anything that addresses this particular issue.

    And here is the parallel explain plan:
    PLAN_TABLE_OUTPUT
    Plan hash value: 1293981491
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time | TQ |IN-OUT| PQ Distrib |
    | 0 | SELECT STATEMENT | | 81M| 17G| | 19232 (2)| 00:00:01 | | | |
    | 1 | TABLE ACCESS BY INDEX ROWID | MART$SC_SCORES | 1 | 13 | | 3 (0)| 00:00:01 | | | |
    |* 2 | INDEX UNIQUE SCAN | SSCS_SDCC_FK_I | 1 | | | 2 (0)| 00:00:01 | | | |
    | 3 | PX COORDINATOR | | | | | | | | | |
    | 4 | PX SEND QC (RANDOM) | :TQ10017 | 81M| 17G| | 19232 (2)| 00:00:01 | Q1,17 | P->S | QC (RAND) |
    |* 5 | HASH JOIN RIGHT OUTER BUFFERED | | 81M| 17G| | 19232 (2)| 00:00:01 | Q1,17 | PCWP | |
    | 6 | PX RECEIVE | | 41925 | 491K| | 2 (0)| 00:00:01 | Q1,17 | PCWP | |
    | 7 | PX SEND BROADCAST | :TQ10014 | 41925 | 491K| | 2 (0)| 00:00:01 | Q1,14 | P->P | BROADCAST |
    | 8 | PX BLOCK ITERATOR | | 41925 | 491K| | 2 (0)| 00:00:01 | Q1,14 | PCWC | |
    | 9 | INDEX FAST FULL SCAN | I_DWH_ZIP_ZIPCODE_EIDIID | 41925 | 491K| | 2 (0)| 00:00:01 | Q1,14 | PCWP | |
    |* 10 | HASH JOIN | | 81M| 16G| | 19218 (2)| 00:00:01 | Q1,17 | PCWP | |
    | 11 | JOIN FILTER CREATE | :BF0000 | 6414K| 159M| | 806 (2)| 00:00:01 | Q1,17 | PCWP | |
    | 12 | PX RECEIVE | | 6414K| 159M| | 806 (2)| 00:00:01 | Q1,17 | PCWP | |
    | 13 | PX SEND HASH | :TQ10015 | 6414K| 159M| | 806 (2)| 00:00:01 | Q1,15 | P->P | HASH |
    | 14 | PX BLOCK ITERATOR | | 6414K| 159M| | 806 (2)| 00:00:01 | Q1,15 | PCWC | |
    |* 15 | INDEX FAST FULL SCAN | I_DWH_ADDRESS_COMB_ZIP | 6414K| 159M| | 806 (2)| 00:00:01 | Q1,15 | PCWP | |
    | 16 | PX RECEIVE | | 80M| 14G| | 18397 (2)| 00:00:01 | Q1,17 | PCWP | |
    | 17 | PX SEND HASH | :TQ10016 | 80M| 14G| | 18397 (2)| 00:00:01 | Q1,16 | P->P | HASH |
    | 18 | JOIN FILTER USE | :BF0000 | 80M| 14G| | 18397 (2)| 00:00:01 | Q1,16 | PCWP | |
    |* 19 | HASH JOIN RIGHT OUTER BUFFERED | | 80M| 14G| | 18397 (2)| 00:00:01 | Q1,16 | PCWP | |
    | 20 | PX RECEIVE | | 42M| 409M| | 827 (2)| 00:00:01 | Q1,16 | PCWP | |
    | 21 | PX SEND HASH | :TQ10012 | 42M| 409M| | 827 (2)| 00:00:01 | Q1,12 | P->P | HASH |
    | 22 | PX BLOCK ITERATOR | | 42M| 409M| | 827 (2)| 00:00:01 | Q1,12 | PCWC | |
    | 23 | MAT_VIEW ACCESS FULL | MBI$CMN_ACTION_COST | 42M| 409M| | 827 (2)| 00:00:01 | Q1,12 | PCWP | |
    | 24 | PX RECEIVE | | 80M| 14G| | 17549 (1)| 00:00:01 | Q1,16 | PCWP | |
    | 25 | PX SEND HASH | :TQ10013 | 80M| 14G| | 17549 (1)| 00:00:01 | Q1,13 | P->P | HASH |
    |* 26 | HASH JOIN BUFFERED | | 80M| 14G| | 17549 (1)| 00:00:01 | Q1,13 | PCWP | |
    | 27 | PX RECEIVE | | 6312K| 794M| | 7519 (1)| 00:00:01 | Q1,13 | PCWP | |
    | 28 | PX SEND HASH | :TQ10010 | 6312K| 794M| | 7519 (1)| 00:00:01 | Q1,10 | P->P | HASH |
    |* 29 | HASH JOIN RIGHT OUTER BUFFERED | | 6312K| 794M| | 7519 (1)| 00:00:01 | Q1,10 | PCWP | |
    | 30 | VIEW | | 4443K| 80M| | 2125 (2)| 00:00:01 | Q1,10 | PCWP | |
    | 31 | HASH GROUP BY | | 4443K| 33M| 158M| 2125 (2)| 00:00:01 | Q1,10 | PCWP | |
    | 32 | PX RECEIVE | | 10M| 78M| | 950 (1)| 00:00:01 | Q1,10 | PCWP | |
    | 33 | PX SEND HASH | :TQ10007 | 10M| 78M| | 950 (1)| 00:00:01 | Q1,07 | P->P | HASH |
    | 34 | PX BLOCK ITERATOR | | 10M| 78M| | 950 (1)| 00:00:01 | Q1,07 | PCWC | |
    | 35 | TABLE ACCESS FULL | DWH$PHONE | 10M| 78M| | 950 (1)| 00:00:01 | Q1,07 | PCWP | |
    |* 36 | HASH JOIN | | 6312K| 680M| | 5392 (1)| 00:00:01 | Q1,10 | PCWP | |
    | 37 | PX RECEIVE | | 6329K| 36M| | 130 (2)| 00:00:01 | Q1,10 | PCWP | |
    | 38 | PX SEND HASH | :TQ10008 | 6329K| 36M| | 130 (2)| 00:00:01 | Q1,08 | P->P | HASH |
    | 39 | PX BLOCK ITERATOR | | 6329K| 36M| | 130 (2)| 00:00:01 | Q1,08 | PCWC | |
    | 40 | INDEX FAST FULL SCAN | PK_DWH_DEBTOR | 6329K| 36M| | 130 (2)| 00:00:01 | Q1,08 | PCWP | |
    | 41 | PX RECEIVE | | 6312K| 644M| | 5259 (1)| 00:00:01 | Q1,10 | PCWP | |
    | 42 | PX SEND HASH | :TQ10009 | 6312K| 644M| | 5259 (1)| 00:00:01 | Q1,09 | P->P | HASH |
    |* 43 | HASH JOIN RIGHT OUTER BUFFERED| | 6312K| 644M| | 5259 (1)| 00:00:01 | Q1,09 | PCWP | |
    | 44 | PX RECEIVE | | 3689K| 31M| | 4271 (1)| 00:00:01 | Q1,09 | PCWP | |
    | 45 | PX SEND HASH | :TQ10005 | 3689K| 31M| | 4271 (1)| 00:00:01 | Q1,05 | P->P | HASH |
    | 46 | VIEW | | 3689K| 31M| | 4271 (1)| 00:00:01 | Q1,05 | PCWP | |
    | 47 | HASH GROUP BY | | 3689K| 56M| 84M| 4271 (1)| 00:00:01 | Q1,05 | PCWP | |
    | 48 | PX RECEIVE | | 3689K| 56M| | 3653 (1)| 00:00:01 | Q1,05 | PCWP | |
    | 49 | PX SEND HASH | :TQ10003 | 3689K| 56M| | 3653 (1)| 00:00:01 | Q1,03 | P->P | HASH |
    |* 50 | HASH JOIN | | 3689K| 56M| | 3653 (1)| 00:00:01 | Q1,03 | PCWP | |
    | 51 | BUFFER SORT | | | | | | | Q1,03 | PCWC | |
    | 52 | PX RECEIVE | | 3 | 21 | | 1 (0)| 00:00:01 | Q1,03 | PCWP | |
    | 53 | PX SEND BROADCAST | :TQ10000 | 3 | 21 | | 1 (0)| 00:00:01 | | S->P | BROADCAST |
    | 54 | INLIST ITERATOR | | | | | | | | | |
    |* 55 | INDEX RANGE SCAN | I_DWH_PAYMENT_TYPE_EIDIID | 3 | 21 | | 1 (0)| 00:00:01 | | | |
    | 56 | PX BLOCK ITERATOR | | 28M| 242M| | 3648 (1)| 00:00:01 | Q1,03 | PCWC | |
    |* 57 | TABLE ACCESS FULL | DWH$PAYMENT | 28M| 242M| | 3648 (1)| 00:00:01 | Q1,03 | PCWP | |
    | 58 | PX RECEIVE | | 6312K| 589M| | 986 (2)| 00:00:01 | Q1,09 | PCWP | |
    | 59 | PX SEND HASH | :TQ10006 | 6312K| 589M| | 986 (2)| 00:00:01 | Q1,06 | P->P | HASH |
    |* 60 | HASH JOIN | | 6312K| 589M| | 986 (2)| 00:00:01 | Q1,06 | PCWP | |
    | 61 | PX RECEIVE | | 2937 | 172K| | 5 (20)| 00:00:01 | Q1,06 | PCWP | |
    | 62 | PX SEND BROADCAST | :TQ10004 | 2937 | 172K| | 5 (20)| 00:00:01 | Q1,04 | P->P | BROADCAST |
    |* 63 | HASH JOIN BUFFERED | | 2937 | 172K| | 5 (20)| 00:00:01 | Q1,04 | PCWP | |
    | 64 | PX RECEIVE | | 220 | 1540 | | 2 (0)| 00:00:01 | Q1,04 | PCWP | |
    | 65 | PX SEND HASH | :TQ10001 | 220 | 1540 | | 2 (0)| 00:00:01 | Q1,01 | P->P | HASH |
    | 66 | PX BLOCK ITERATOR | | 220 | 1540 | | 2 (0)| 00:00:01 | Q1,01 | PCWC | |
    | 67 | TABLE ACCESS FULL | DWH$MANDATOR | 220 | 1540 | | 2 (0)| 00:00:01 | Q1,01 | PCWP | |
    | 68 | PX RECEIVE | | 2937 | 152K| | 2 (0)| 00:00:01 | Q1,04 | PCWP | |
    | 69 | PX SEND HASH | :TQ10002 | 2937 | 152K| | 2 (0)| 00:00:01 | Q1,02 | P->P | HASH |
    | 70 | PX BLOCK ITERATOR | | 2937 | 152K| | 2 (0)| 00:00:01 | Q1,02 | PCWC | |
    | 71 | TABLE ACCESS FULL | DWH$PACKAGE | 2937 | 152K| | 2 (0)| 00:00:01 | Q1,02 | PCWP | |
    | 72 | PX BLOCK ITERATOR | | 6312K| 228M| | 980 (1)| 00:00:01 | Q1,06 | PCWC | |
    | 73 | TABLE ACCESS FULL | DWH$CASE | 6312K| 228M| | 980 (1)| 00:00:01 | Q1,06 | PCWP | |
    | 74 | PX RECEIVE | | 78M| 4199M| | 10016 (1)| 00:00:01 | Q1,13 | PCWP | |
    | 75 | PX SEND HASH | :TQ10011 | 78M| 4199M| | 10016 (1)| 00:00:01 | Q1,11 | P->P | HASH |
    | 76 | PX BLOCK ITERATOR | | 78M| 4199M| | 10016 (1)| 00:00:01 | Q1,11 | PCWC | |
    |* 77 | TABLE ACCESS FULL | DWH$ACTION | 78M| 4199M| | 10016 (1)| 00:00:01 | Q1,11 | PCWP | |
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------

  • Alter user default tablespace and temporary tablespace

    Hi guru,
    target : to ensure that users don't have the SYSTEM tablespace as their TEMPORARY or DEFAULT tablespace
    scenario :
    user default tablespace temporary tablespace
    xxyym system system
    Question: How to alter user ?
    tq

    In a scenario, let's say you want to make USERS the default tablespace for existing users and TEMP the default temporary tablespace, you can also create the alter statements as below into one script based on the output and run it.
    select 'ALTER USER '||username||' DEFAULT TABLESPACE USERS;'  FROM DBA_USERS WHERE DEFAULT_TABLESPACE IN('SYSTEM')
    and username not in('SYS','SYSTEM');
    select 'ALTER USER '||username||' TEMPORARY TABLESPACE TEMP;'  FROM DBA_USERS WHERE TEMPORARY_TABLESPACE IN('SYSTEM');As magnus mentioned, don't forget to do this(if USERS and TEMP is what you want to go with) :
    ALTER DATABASE DEFAULT TABLESPACE USERS;
    ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMP;

Maybe you are looking for

  • Export metadata

    I am using the web center portal framework. I have added portals during runtime. I have deployed this application on a standalone server and I donot see the portals I created during runtime. As far as my knowledge is concerned, these portals are save

  • BPM Process trigger -  giving error

    Hi , I have created the WSDL file to trigger start process of BPM. When i am executing the webservice from WSNAVIGATOR am getting the below error:- process() [EXCEPTION] com.sap.engine.interfaces.webservices.runtime.RuntimeProcessException: Technical

  • Accessing select result in an SQL query

    I would like to know if anyone has a simple solution to this problem. I have a database with a table in it called events; the table has five fields: event_id, game_type_id, game_venue_id, game_day, and game_time. I would like to build a form that sel

  • [svn:osmf:] 14180: PARB changes: Move BinarySearch to layout package, it doesn't need to be part of the public API.

    Revision: 14180 Revision: 14180 Author:   [email protected] Date:     2010-02-15 21:52:51 -0800 (Mon, 15 Feb 2010) Log Message: PARB changes: Move BinarySearch to layout package, it doesn't need to be part of the public API. Modified Paths:     osmf/

  • How i can activate the gps in 5800 in Egypt

    hey the gps was not allow in egypt and it now allow  so im asking how to  activate it