Unusual Temp Tablespace Growth

Hi ,
We have noticed unsual temp tablespace growth when concurrent users are accessing OLAP cube through BI Bean crosstabs.
On an average 3 to 4 GB temp tablespace is consumed for each new user. OLAP cube has 7 dimensions and 1.2 million records and is fully precalculated.
This causes the system to fail as a result of temp tablespace getting full.
Can somebody please let me know what can be the root causes?.
Thanks in advance.
Harry

Hi there,
It is not unusual for OLAP queries to make significant use of temp tablespace. 3-4GB doesn't sound unreasonable to me. The actual amount used depends on factors such as the type of activity and the number of users.
There is a brief description of how OLAP uses temp tablespace here :- http://download.oracle.com/docs/cd/B28359_01/olap.111/b28124/admin.htm#sthref442
Note the lower than standard setting 'EXTENT MANAGEMENT LOCAL UNIFORM SIZE 256K' - if you are not already using this setting then you may find that it lowers temp space usage as the default setting is usually 1024K or even 4096K
I hope this helps
Stuart

Similar Messages

  • Unusual temp??

    The other day after I installed my new RAM in my system, I got one of my settings wrong in my BIOS. I had to clear the BIOS and I reset things back to the way they were before. After booting up I noticed a temputure change where my CPU had been at an idle 39c I was now 45c. this confused me. but the temp wasn't like way out of the normal so I didn't try to correct it. Today again I was trying to tweak just a little with my RAM settings and again got something wrong. Having to and clear the BIOS again when I booted up this time my temps dropped. on core center I'm running at 38c and on MBM5 I'm at 34c. thats quite a bit of difference. has anyone else had anything like this to happen? and maybe some of the guys that are having temp problems should try reseting the bios to see if there is just a glitch there some where? DeMaxx

    Hi there,
    It is not unusual for OLAP queries to make significant use of temp tablespace. 3-4GB doesn't sound unreasonable to me. The actual amount used depends on factors such as the type of activity and the number of users.
    There is a brief description of how OLAP uses temp tablespace here :- http://download.oracle.com/docs/cd/B28359_01/olap.111/b28124/admin.htm#sthref442
    Note the lower than standard setting 'EXTENT MANAGEMENT LOCAL UNIFORM SIZE 256K' - if you are not already using this setting then you may find that it lowers temp space usage as the default setting is usually 1024K or even 4096K
    I hope this helps
    Stuart

  • Maximum Temp tablespace size you've seen

    DB version: 10.2.0.4
    Our DB caters a retail application . Total DB Size of 3TB. Its is a bit of mix of both OLTP and Batch processing environment.
    Our temp tablespace has 1 file and we had set the tempfile as AUTOEXTEND. Somehow its size has reached 25GB now !
    We don't actually need this. Do we?
    For a fairly busy DB of around 3TB size, what is the maximum temp tablespace size you've ever seen?
    What is the maximum temp tablespace size you've ever seen for Big DB like Telecom, Banking?

    The point about temp space is that your requirements are dynamic - the actively used area shrinks and grows.
    Comparing apples with oranges, tempfile sizes on system where I am currently here amount to 50 GB but to be honest that's mainly due to a not insignificant number of pretty poor queries, run concurrently, with multipass operations, etc.
    Kellyn Pedersen had an example of a process using 720GB here:
    http://dbakevlar.com/?p=43
    Whilst 25GB may not be earth shattering, a "large" temp area may perhaps be an indicator that you want to review some of your application code.
    (What is "large"? "unusual" compared to what is "normal" for your system may be a better metric)
    If you're using automatic pga memory management, then there's a limit to what each session can get, it may be that automatic work areas are not suitable for some of your code and some manual sizing is required to prevent operations spilling unnecessarily.
    Also, inaccurate CBO estimates on your queries can lead to inaccurately sized work areas that then spill into temp.
    There was a reminder of this in one of Randolf Geist's articles on hash aggregation:
    http://oracle-randolf.blogspot.com/2011/01/hash-aggregation.html

  • Is there any way to alter temp tablespace into normal tablespace

    Even though It might be stupid question, i want to know the solution for that...
    Is it possible to alter TEMP tablespace into Normal tablespace?
    One more question, is it possible to create user with TEMP tablespace,
    (I know the usage of temp tablespace also, and we cannot create user with temp tablespace.)
    If some trick or any solution, share with me.
    Thanks in advance.

    1) Can you explain why you want such an unusual situation. By understanding your requirement, perhaps we can suggest alternatives
    2) The requirements and restrictions are described in the CREATE USER command in the SQL Reference manual for whatever version you are using. (The stupid part of your question happens by not specifying any version range. <g>)
    The requirement to use a TEMPORARY tablespace is documented and enforced in 9i. In 8i, we only required a tablespace to be named.
    3) On 10gR2 you see the following response:
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\Documents and Settings\Hans>sqlplus system/oracle
    SQL*Plus: Release 10.2.0.1.0 - Production on Wed Jun 18 06:33:31 2008
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> create user test1 identified by test account unlock
      2  default tablespace temp
      3  temporary tablespace temp;
    create user test1 identified by test account unlock
    ERROR at line 1:
    ORA-12910: cannot specify temporary tablespace as default tablespace
    SQL> create user test2 identified by test account unlock
      2  default tablespace users
      3  temporary tablespace users;
    create user test2 identified by test account unlock
    ERROR at line 1:
    ORA-10615: Invalid tablespace type for temporary tablespace
    SQL> create user test3 identified by test account unlock
      2  default tablespace users
      3  temporary tablespace temp;
    User created.
    SQL Rem Just on case it's complaining about using the same temp tablespace
    SQL> create temporary tablespace temp2 tempfile 'C:\ORACLE\ORADATA\XE\TEMP2.DBF'
    size 10m;
    Tablespace created.
    SQL> create user test4 identified by test account unlock
      2  default tablespace temp
      3  temporary tablespace temp2;
    create user test4 identified by test account unlock
    ERROR at line 1:
    ORA-12910: cannot specify temporary tablespace as default tablespace
    SQL>

  • 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."

  • How to create temp files in temp tablespace

    Dear all,
    Due to outage of our SAN, we our out of production for the
    last 3 days. By the grace of Almighty we have restored production by
    database recovery from our standby backup. Since temp tablespace and
    temp data files do not taken as backup for standby, now after recovery
    we are getting abap dumps asking for temp_1 and temp_2 datafiles.
    Please guide us how to create temp files. v$tablespace is showing tablespace PSAPTEMP but datafile are not there
    Abap dumps are giving these errors as mentioned below
    ====================================================
    The exception must either be prevented, caught within the procedure            
    "DATA_SELECTION"                                                              
    "(FORM)", or declared in the procedure's RAISING clause.                       
    To prevent the exception, note the following:                                  
    Database error text........: "ORA-01157: cannot identify/lock data file 256 -  
    see DBWR trace file#ORA-01110: data file 256:                                 
    '/oracle/SD1/sapdata4/temp_2/temp.data2'"                                     
    Internal call code.........: "[RSQL/FTCH/MARA ]"                               
    ===================================================
    another one asking for 
    '/oracle/SD1/sapdata3/temp_1/temp.data1'"
    Best Regards
    Waqas

    if you want to add a new tempfile to your TEMP Tablespace,you can do like that.
    <i>ALTER TABLESPACE</i> <<b><u>name of TEMP Tablespace</u></b>> ADD TEMPFILE <<b><u><b><u>pfad to the file_and_file name</u></b></u></b>> <b>SIZE</b> <size>;
    You can use also the options <i>REUS</i>E <i>autoextend off</i> or <i>on</i> .
    e.g:
    <i>alter tablespace</i> <u><b>PSAPTEMP</b></u> add <i>tempfile</i> <b><u>'/oracle/SD1/sapdata4/temp_2/temp.data2'</u></b> <i>SIZE 1000K</i> <i>REUSE</i>;
    The directory <b><u>temp_2</u></b> should exist.
    Or you can use the BR*Tools to create a new datafile. Enter brtools and follow the instructions or menu.
    More to TEMP Tablespaces see please following SAP notes:
    <u><b>659946</b></u> - FAQ: Temporary tablespaces
    <u><b>600513</b></u> - ORA-25153 after recovery due to missing tempfiles
    and the Oracle Note:
    <u><b>160426.1</b></u>: TEMPORARY Tablespaces : Tempfiles or Datafiles ?
    I hope it helps.

  • Should I increase TEMP tablespace size here ?

    Version: 10.2.0.4
    Platform : RHEL 5.8
    Currently we are running a batch job in a schema. The default temporary tablespace for that schema is TEMP.
    But I see that the tablespace is full.
    SQL> select file_name, bytes/1024/1024/1024 gb from dba_temp_files where tablespace_name = 'TEMP';
    FILE_NAME                                                                 GB
    /prd/fdms/oradata_db18/fdmsc1sdb/oradata/ts_temp/temp01.dbf               10
    SQL> SELECT     TABLESPACE_NAME, FILE_ID,
            BYTES_USED/1024/1024,
            bytes_free/1024/1024
    FROM V$TEMP_SPACE_HEADER where tablespace_name = 'TEMP'  2    3    4  ;
    TABLESPACE_NAME                             FILE_ID BYTES_USED/1024/1024 BYTES_FREE/1024/1024
    TEMP                                              1                10240          
    So, far the application users have not complained and I didn't see any 'unable to extend' error in the alert log yet,  but the above scenario is dangerous. Right? I mean SQL statements with sorting can error out. Right ? Unlike UNDO, with temp tablespace, temp segments cannot be reused. Right ?

    Hello,
    As said previously, the Sort Segments can be reused, the Views V$SORT_SEGMENT and V$TEMPSEG_USAGE are relevant to monitore the usage of the Temporary Tablespace.
    You'll find in the Note below a way to control over time the Temporary Tablespace:
    How Can Temporary Segment Usage Be Monitored Over Time? [ID 364417.1]
    More over, you may also check for any ORA-01652 in the Alert Log.
    But don't worry to much to get a Full Temporary Tablespace, here "Full" doesn't mean "unreusable".
    Hope this help.
    Best Regards,
    Jean-Valentin Lubiez

  • Restored coldbackup and having trouble with TEMP tablespace

    Hi, i succesfully restored from a coldbackup on solaris.(oracle 9.2)
    i can log on to database using toad, query the database, but when i try to take an export or something i got the error
    EXP-00056: ORACLE error 1157 encountered
    ORA-01157: cannot identify/lock data file 203 - see DBWR trace file
    ORA-01110: data file 203: '/sun2int1/oracle92/app/oracle/product/9.2.1/oradata/TPRS/temp03.dbf'
    ORA-06512: at "SYS.DBMS_LOB", line 424
    ORA-06512: at "SYS.DBMS_METADATA", line 1140
    ORA-06512: at line 1
    EXP-00000: Export terminated unsuccessfully
    when i did the restore, i simply renamed the datafiles and redo logs.
    But i didnt rename the TEMP datafile, as you can not rename it with a "alter database rename file ..." command
    so thats the problem!
    i planned to create a new default temp. tablespace, and simply make it default and drop the other one. but it does not work!
    i tried to execute:
    CREATE TEMPORARY TABLESPACE temp4 TEMPFILE '/oracleAS/TPRS/oradata/TPRS/temp4.dbf' SIZE 5M REUSE AUTOEXTEND ON NEXT 1M MAXSIZE unlimited
    EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M;
    create temporary tablespace temp01 tempfile '/oracleAS/TPRS/oradata/TPRS/temp01.dbf' size 100M;
    but they all hang! i wait, but nothing happens! (and alert log does not log anything too)
    and finally i tried to drop the default tablespace, and i couldnt drop it as i thought. (ORA-12906: cannot drop default temporary tablespace
    So, im stuck and i beleive i have to RENAME the datafile for temporary tablespace. how can i do this?
    Edited by: merope on Jun 9, 2009 11:32 AM

    SQL> col file_name for a50
    col status for a15
    col tablespace_name for a15
    col PROPERTY_VALUE for a20
    select file_name,tablespace_name,bytes/1024/1024 as "SIZE_IN_MB",status,autoextensible from dba_temp_files;
    SELECT PROPERTY_NAME,PROPERTY_VALUE FROM DATABASE_PROPERTIES where PROPERTY_NAME='DEFAULT_TEMP_TABLESPACE';
    SQL> SQL> SQL> SQL> SQL> SQL> ERROR:
    ORA-01157: cannot identify/lock data file 202 - see DBWR trace file
    ORA-01110: data file 202: '/izmir1/oradbTPRS/temp1.db'
    no rows selected
    SQL>
    PROPERTY_NAME          PROPERTY_VALUE
    DEFAULT_TEMP_TABLESPACE TEMP3
    This is not the actual directory: /izmir1/oradbTPRS/temp1.db
    it is the old location, but in the restored db, the temp1.db file is in some other directory
    how can i rename this?
    Edited by: merope on Jun 9, 2009 11:50 AM

  • 9i on Linux. Problems with Temp tablespace cleanup

    I am currently running Oracle 9i Enterprise on SUSE Linux 7.2.
    I am executing queries against the new XMLType datatype and every query adds to the Temp tablespace, which doesn't get cleaned up. Eventually, the tablespace will run out of space and Oracle will issue and error:
    ORA-01652: unable to extend temp segment by 128 in tablespace <name>
    The only way to clean up the Temp tablespace seems to be by restarting the server.
    Is that happening on other platforms as well? I would appreciate any help.

    Hi
    You can connect to the database as DBA (Sys or System) and make a bigger temporal tablespace. Or create a new bigger temporary tablespace and assign it to the user.
    A10!
    PS: Temporary tablespace is used when no memory available for the session, for example when a big ORDER BY is done. Try to increase the memory assigned, just look at initXXX.ora (sort_size)

  • Full temp tablespace

    hi all,
    i faced a problem regarding full temp tablespace, i added a tempfile as an immediate measure ,but the problem was with a query
    i identified it
    the query is
    SELECT DISTINCT rt.po_unit_price item_price,
    pl.unit_meas_lookup_code uom_code,
    TO_NUMBER (porh.segment1) req_number,
    msi.segment1 item_code, pl.item_description,
    ph.po_header_id, TO_NUMBER (ph.segment1) po_number,
    TRUNC (ph.creation_date) po_date, pv.vendor_name supplier,
    pll.need_by_date, pl.quantity qty_ordered,
    rt.quantity quantity_received,
    (rt.quantity * rt.po_unit_price) pl_amount,
    ph.currency_code, isd.ige_number ge_no,
    isd.ige_date ge_date, rsh.receipt_num,
    TRUNC (rt.transaction_date) receipt_date,
    isd.lr_number gr_no, isd.transporter_name transporter,
    (SELECT SUM (j.tax_amount)
    FROM ja_in_receipt_tax_lines j
    WHERE j.shipment_header_id =
    rsl.shipment_header_id
    AND j.shipment_line_id = rsl.shipment_line_id
    AND j.tax_name LIKE 'PO%Freight%') freight,
    pvs.vat_reg_no, pvs.cst_reg_no,
    pvs.service_tax_regno st_reg_no,
    pvs.excise_duty_reg_no excise_reg_no,
    pvs.st_reg_no lst_reg_no, ai.invoice_num, ai.invoice_date,
    ai.invoice_amount invoice_amount, ai.invoice_currency_code,
    TRUNC (ai.terms_date + atl.due_days) date_of_payment,
    TRUNC (aca.check_date) payment_date, aca.check_number,
    aca.bank_account_name mode_of_payment,
    TRUNC (aip.accounting_date) gl_date
    FROM po_headers_all ph,
    po_lines_all pl,
    po_line_locations_all pll,
    po_distributions_all pod,
    po_req_distributions_all pord,
    po_requisition_lines_all porl,
    po_requisition_headers_all porh,
    mtl_system_items msi,
    po_vendors pv,
    ja_in_po_vendor_sites pvs,
    rcv_transactions rt,
    rcv_shipment_headers rsh,
    rcv_shipment_lines rsl,
    ja_in_receipt_tax_lines jirtl,
    ja_in_tax_codes jitc,
    ap_invoice_distributions_all aid,
    ap_invoices_all ai,
    ap_terms_tl att,
    ap_terms_lines atl,
    ap_invoice_payments_all aip,
    ap_checks_all aca,
    kpm_ige_security_details isd,
    kpm_ige_purchase_orders ipo
    WHERE ph.po_header_id = pl.po_header_id
    AND ph.po_header_id = pod.po_header_id
    AND pl.po_line_id = pod.po_line_id
    AND pl.po_line_id = pll.po_line_id
    AND pl.item_id = msi.inventory_item_id
    AND pod.req_distribution_id = pord.distribution_id(+)
    AND pord.requisition_line_id = porl.requisition_line_id(+)
    AND porl.requisition_header_id = porh.requisition_header_id(+)
    AND msi.organization_id = 136
    AND
    pv.vendor_id = pvs.vendor_id
    AND ph.vendor_id = pv.vendor_id
    AND ph.vendor_site_id = pvs.vendor_site_id
    AND rt.po_header_id = pl.po_header_id
    AND rt.po_line_id = pl.po_line_id
    AND rt.transaction_type = 'RECEIVE'
    AND isd.ige_header_id = ipo.ige_header_id
    AND ipo.po_header_id = ph.po_header_id
    AND rsh.shipment_header_id = rsl.shipment_header_id
    AND rt.shipment_header_id = rsl.shipment_header_id
    AND rt.shipment_line_id = rsl.shipment_line_id
    AND rsl.shipment_header_id = jirtl.shipment_header_id
    AND rsl.shipment_line_id = jirtl.shipment_line_id
    AND jirtl.tax_id = jitc.tax_id
    AND aid.po_distribution_id = pod.po_distribution_id
    AND aid.rcv_transaction_id = rt.transaction_id
    AND aid.invoice_id = ai.invoice_id
    AND ai.invoice_type_lookup_code = 'STANDARD'
    AND ai.terms_id = att.term_id
    AND att.term_id = atl.term_id
    AND aip.invoice_id(+) = ai.invoice_id
    AND aip.check_id = aca.check_id(+);
    i am unable to identify the main cause, i know some tables are large , but how do i optimize it
    I CAN SEND THE EXPLAIN PLAN ON EMAIL AS IT WONT GET DISPALYED HERE PROPERLY
    database is 10g and OS is HP UX 11.11
    the query runs perfectly on 9i
    Edited by: user7864753 on Dec 4, 2009 2:55 PM

    >
    database is 10g and OS is HP UX 11.11
    the query runs perfectly on 9iDid you compare 9i and 10g plan ?
    What changed ?
    Was the DB migrated ? How ?
    Were statistics recalculated ?
    >
    PLAN_TABLE_OUTPUT
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)|
    | 0 | SELECT STATEMENT | | 1 | 547 | 1224 (4)|
    | 1 | SORT AGGREGATE | | 1 | 31 | |
    |* 2 | TABLE ACCESS BY INDEX ROWID | JA_IN_RECEIPT_TAX_LINES | 1 | 31 | 4 (0)|
    |* 3 | INDEX RANGE SCAN | JA_IN_RECEIPT_TAX_LINES_N2 | 4 | | 3 (0)|
    | 4 | HASH UNIQUE | | 1 | 547 | 1224 (4)|
    | 5 | NESTED LOOPS | | 1 | 547 | 1223 (4)|
    | 6 | NESTED LOOPS | | 1 | 543 | 1223 (4)|
    | 7 | NESTED LOOPS | | 1 | 527 | 1220 (4)|
    | 8 | NESTED LOOPS | | 1 | 491 | 1219 (4)|
    | 9 | NESTED LOOPS | | 1 | 473 | 1216 (4)|
    | 10 | NESTED LOOPS | | 1 | 465 | 1214 (4)|
    | 11 | NESTED LOOPS | | 1 | 460 | 1213 (4)|
    | 12 | NESTED LOOPS | | 1 | 400 | 1211 (4)|
    | 13 | NESTED LOOPS | | 1 | 388 | 1204 (4)|
    | 14 | NESTED LOOPS | | 1 | 376 | 1203 (4)|
    | 15 | NESTED LOOPS | | 1 | 364 | 1202 (4)|
    | 16 | NESTED LOOPS | | 1 | 351 | 1200 (4)|
    | 17 | NESTED LOOPS | | 1 | 297 | 1192 (4)|
    | 18 | NESTED LOOPS | | 1 | 274 | 1190 (4)|
    | 19 | NESTED LOOPS | | 5 | 1050 | 1185 (4)|
    | 20 | NESTED LOOPS | | 5 | 985 | 1180 (4)|
    | 21 | NESTED LOOPS | | 5 | 935 | 1175 (4)|
    | 22 | NESTED LOOPS | | 5 | 885 | 1170 (4)|
    |* 23 | HASH JOIN | | 6 | 954 | 1158 (4)|
    |* 24 | HASH JOIN | | 6 | 684 | 1029 (4)|
    |* 25 | HASH JOIN | | 29 | 3045 | 898 (4)|
    |* 26 | HASH JOIN | | 7077 | 483K| 90 (6)|
    | 27 | VIEW | index$_join$_010 | 4217 | 123K| 57 (4)|
    |* 28 | HASH JOIN | | | | |
    | 29 | INDEX FAST FULL SCAN | PO_VENDORS_U1 | 4217 | 123K| 19 (0)|
    | 30 | INDEX FAST FULL SCAN | PO_VENDORS_U2 | 4217 | 123K| 37 (3)|
    | 31 | TABLE ACCESS FULL | JA_IN_PO_VENDOR_SITES | 7077 | 276K| 32 (7)|
    | 32 | TABLE ACCESS FULL | PO_HEADERS_ALL | 52500 | 1794K| 805 (4)|
    PLAN_TABLE_OUTPUT
    |* 33 | TABLE ACCESS FULL | KPM_IGE_PURCHASE_ORDERS | 10824 | 97416 | 130 (3)|
    | 34 | TABLE ACCESS FULL | KPM_IGE_SECURITY_DETAILS | 14910 | 655K| 128 (4)|
    |* 35 | TABLE ACCESS BY INDEX ROWID| PO_DISTRIBUTIONS_ALL | 1 | 18 | 3 (0)|
    |* 36 | INDEX RANGE SCAN | PO_DISTRIBUTIONS_N3 | 4 | | 1 (0)|
    | 37 | TABLE ACCESS BY INDEX ROWID | PO_REQ_DISTRIBUTIONS_ALL | 1 | 10 | 1 (0)|
    |* 38 | INDEX UNIQUE SCAN | PO_REQ_DISTRIBUTIONS_U1 | 1 | | 0 (0)|
    | 39 | TABLE ACCESS BY INDEX ROWID | PO_REQUISITION_LINES_ALL | 1 | 10 | 1 (0)|
    |* 40 | INDEX UNIQUE SCAN | PO_REQUISITION_LINES_U1 | 1 | | 0 (0)|
    | 41 | TABLE ACCESS BY INDEX ROWID | PO_REQUISITION_HEADERS_ALL | 1 | 13 | 1 (0)|
    |* 42 | INDEX UNIQUE SCAN | PO_REQUISITION_HEADERS_U1 | 1 | | 0 (0)|
    |* 43 | TABLE ACCESS BY INDEX ROWID | PO_LINES_ALL | 1 | 64 | 1 (0)|
    |* 44 | INDEX UNIQUE SCAN | PO_LINES_U1 | 1 | | 0 (0)|
    | 45 | TABLE ACCESS BY INDEX ROWID | MTL_SYSTEM_ITEMS_B | 1 | 23 | 2 (0)|
    |* 46 | INDEX UNIQUE SCAN | MTL_SYSTEM_ITEMS_B_U1 | 1 | | 1 (0)|
    |* 47 | TABLE ACCESS BY INDEX ROWID | RCV_TRANSACTIONS | 1 | 54 | 8 (0)|
    |* 48 | INDEX RANGE SCAN | RCV_TRANSACTIONS_N5 | 7 | | 2 (0)|
    | 49 | TABLE ACCESS BY INDEX ROWID | PO_LINE_LOCATIONS_ALL | 1 | 13 | 2 (0)|
    |* 50 | INDEX RANGE SCAN | PO_LINE_LOCATIONS_N1 | 2 | | 1 (0)|
    |* 51 | TABLE ACCESS BY INDEX ROWID | RCV_SHIPMENT_LINES | 1 | 12 | 1 (0)|
    |* 52 | INDEX UNIQUE SCAN | RCV_SHIPMENT_LINES_U1 | 1 | | 0 (0)|
    | 53 | TABLE ACCESS BY INDEX ROWID | RCV_SHIPMENT_HEADERS | 1 | 12 | 1 (0)|
    |* 54 | INDEX UNIQUE SCAN | RCV_SHIPMENT_HEADERS_U1 | 1 | | 0 (0)|
    |* 55 | TABLE ACCESS BY INDEX ROWID | AP_INVOICE_DISTRIBUTIONS_ALL | 1 | 12 | 7 (0)|
    |* 56 | INDEX RANGE SCAN | AP_INVOICE_DISTRIBUTIONS_N17 | 7 | | 2 (0)|
    |* 57 | TABLE ACCESS BY INDEX ROWID | AP_INVOICES_ALL | 1 | 60 | 2 (0)|
    |* 58 | INDEX UNIQUE SCAN | AP_INVOICES_U1 | 1 | | 1 (0)|
    |* 59 | INDEX RANGE SCAN | AP_TERMS_TL_U1 | 1 | 5 | 1 (0)|
    | 60 | TABLE ACCESS BY INDEX ROWID | AP_TERMS_LINES | 2 | 16 | 2 (0)|
    |* 61 | INDEX RANGE SCAN | AP_TERMS_LINES_U1 | 2 | | 1 (0)|
    | 62 | TABLE ACCESS BY INDEX ROWID | AP_INVOICE_PAYMENTS_ALL | 1 | 18 | 3 (0)|
    |* 63 | INDEX RANGE SCAN | AP_INVOICE_PAYMENTS_N1 | 1 | | 2 (0)|
    | 64 | TABLE ACCESS BY INDEX ROWID | AP_CHECKS_ALL | 1 | 36 | 1 (0)|
    |* 65 | INDEX UNIQUE SCAN | AP_CHECKS_U1 | 1 | | 0 (0)|
    | 66 | TABLE ACCESS BY INDEX ROWID | JA_IN_RECEIPT_TAX_LINES | 1 | 16 | 3 (0)|
    |* 67 | INDEX RANGE SCAN | JA_IN_RECEIPT_TAX_LINES_N2 | 4 | | 2 (0)|
    |* 68 | INDEX UNIQUE SCAN | JA_IN_TAX_CODES_U1 | 1 | 4 | 0 (0)|
    PLAN_TABLE_OUTPUT
    Predicate Information (identified by operation id):
    2 - filter("J"."TAX_NAME" LIKE 'PO%Freight%')
    3 - access("J"."SHIPMENT_HEADER_ID"=:B1 AND "J"."SHIPMENT_LINE_ID"=:B2)
    23 - access("ISD"."IGE_HEADER_ID"="IPO"."IGE_HEADER_ID")
    24 - access("IPO"."PO_HEADER_ID"="PH"."PO_HEADER_ID")
    25 - access("PH"."VENDOR_ID"="PV"."VENDOR_ID" AND "PH"."VENDOR_SITE_ID"="PVS"."VENDOR_SITE_ID")
    26 - access("PV"."VENDOR_ID"="PVS"."VENDOR_ID")
    28 - access(ROWID=ROWID)
    33 - filter("IPO"."PO_HEADER_ID" IS NOT NULL)
    35 - filter("POD"."REQ_DISTRIBUTION_ID" IS NOT NULL)
    36 - access("PH"."PO_HEADER_ID"="POD"."PO_HEADER_ID")
    38 - access("POD"."REQ_DISTRIBUTION_ID"="PORD"."DISTRIBUTION_ID")
    40 - access("PORD"."REQUISITION_LINE_ID"="PORL"."REQUISITION_LINE_ID")
    42 - access("PORL"."REQUISITION_HEADER_ID"="PORH"."REQUISITION_HEADER_ID")
    43 - filter("PH"."PO_HEADER_ID"="PL"."PO_HEADER_ID")
    44 - access("PL"."PO_LINE_ID"="POD"."PO_LINE_ID")
    46 - access("PL"."ITEM_ID"="MSI"."INVENTORY_ITEM_ID" AND "MSI"."ORGANIZATION_ID"=136)
    47 - filter("RT"."TRANSACTION_TYPE"='RECEIVE' AND "RT"."PO_HEADER_ID"="PL"."PO_HEADER_ID")
    48 - access("RT"."PO_LINE_ID"="PL"."PO_LINE_ID")
    50 - access("PL"."PO_LINE_ID"="PLL"."PO_LINE_ID")
    51 - filter("RT"."SHIPMENT_HEADER_ID"="RSL"."SHIPMENT_HEADER_ID")
    52 - access("RT"."SHIPMENT_LINE_ID"="RSL"."SHIPMENT_LINE_ID")
    54 - access("RSH"."SHIPMENT_HEADER_ID"="RSL"."SHIPMENT_HEADER_ID")
    55 - filter("AID"."PO_DISTRIBUTION_ID" IS NOT NULL AND
    "AID"."PO_DISTRIBUTION_ID"="POD"."PO_DISTRIBUTION_ID")
    56 - access("AID"."RCV_TRANSACTION_ID"="RT"."TRANSACTION_ID")
    filter("AID"."RCV_TRANSACTION_ID" IS NOT NULL)
    57 - filter("AI"."INVOICE_TYPE_LOOKUP_CODE"='STANDARD')
    58 - access("AID"."INVOICE_ID"="AI"."INVOICE_ID")
    59 - access("AI"."TERMS_ID"="ATT"."TERM_ID")
    61 - access("ATT"."TERM_ID"="ATL"."TERM_ID")
    63 - access("AIP"."INVOICE_ID"="AI"."INVOICE_ID")
    65 - access("AIP"."CHECK_ID"="ACA"."CHECK_ID")
    67 - access("RSL"."SHIPMENT_HEADER_ID"="JIRTL"."SHIPMENT_HEADER_ID" AND
    PLAN_TABLE_OUTPUT
    "RSL"."SHIPMENT_LINE_ID"="JIRTL"."SHIPMENT_LINE_ID")
    68 - access("JIRTL"."TAX_ID"="JITC"."TAX_ID")
    Note
    - 'PLAN_TABLE' is old version
    117 rows selected.

  • Oracle 9i TEMP tablespace backup problem using RMAN!

    Oracle8/8i whole backup is ok for our backup software(using RMAN without RC database), but for Oracle 9i, I get following error messages when backing up temp tablespace.
    1. RMAN-20202: tablespace not found in the recovery catalog
    2. RMAN-06019: could not translate tablespace name "TEMP"
    I check some views of Oracle9i, and know some changes happen for temp tablespace in 9i, but how to deal with this problem. Any idea, please!

    In 9i RMAN does not restore temporary datafiles. Instead, you should create them after your restore. I believe that Oracle is going to make a change to this in the next release of 9i and have RMAN create the temporary files. You can view the temporary datafiles @ v$tempfile.
    I believe RMAN doesn't restore temporary files because they are locally managed and not in the control files. RMAN reads the controlfile of the target database to obtain info about backups, datafiles, etc.
    Hope this helps.

  • To shrink the size of TEMP tablespace

    Dear all,
    There is a databse with RAC, now in OEM the size of TEMP tablespace has been reached at 99.9%. now we want to shrink the size of TEMP tablespace.
    how to we do that???????
    plz help me...........

    Temporary tablespaces usually show they are full, however this space is not actually in use. It is rather allocated. Oracle has evaluated the best way to obtain the most of performance, and he said it is better to allocate once than allocate-deallocate-reallocate extents, so temporary space is not 'released'.
    If you want to feel psychologically more confortable with lower allocated space, you can drop your tablespace (create an interim default temporary tablespace first) and recreate it.
    You can also rebuild temporary datafiles:
    alter tablespace temp add tempfile 'C:\ORACLE\ORACLEXE\ORADATA\XE\TEMP01.dbf' size 32m;
    SQL> select name from v$tempfile;
    NAME
    C:\ORACLE\ORACLEXE\ORADATA\XE\TEMP.DBF
    C:\ORACLE\ORACLEXE\ORADATA\XE\TEMP01.DBF
    SQL> alter database tempfile 'C:\ORACLE\ORACLEXE\ORADATA\XE\TEMP01.DBF' drop including datafiles;
    Database altered.

  • Check and identify cause of previous temp tablespace usage

    Hi
    Our production ERP database is on solaris and on version 9.2.0.8.0. The application tier and database tier are on two separate nodes.
    Recently we observed that the temporary tablespace is being consumed more on a particular day. While monitoring the database,we observed the free temp tablespace was less and hence added 10gb space to it. However within 5-6 hours this space was utilised and certain requests/jobs failed due to no space in temp. This happened on 04th December 2012. Though the situation returned to normal post that,we need to find the cause of consumption of temporary tablespace in such large volumes. We are on 9i database and hence tried identifying the queries through statspack report as no views in particular exist for 9i.
    We came across many queries which would help us identfy the current temp usage,but in 9i,we didnot find anything which would guide us on the historic temp tablespace usage. Can it be found via statspack? If yes,what exactly to check for in it? Request you to all please advice. Thanks.
    Regards
    Rdxdba

    -- To get historic information for a spesific sid,serial
    column temp_mb format 99999999
    column sample_time format a25
    prompt
    prompt DBA_HIST_ACTIVE_SESS_HISTORY
    prompt
    select sample_time,session_id,session_serial#,sql_id,temp_space_allocated/1024/1024 temp_mb,
    temp_space_allocated/1024/1024-lag(temp_space_allocated/1024/1024,1,0) over (order by sample_time) as temp_diff
    from dba_hist_active_sess_history
    --from v$active_session_history
    where
    session_id=&1
    and session_serial#=&2
    order by sample_time asc
    prompt
    prompt ACTIVE_SESS_HIST
    prompt
    select sample_time,session_id,session_serial#,sql_id,temp_space_allocated/1024/1024 temp_mb,
    temp_space_allocated/1024/1024-lag(temp_space_allocated/1024/1024,1,0) over (order by sample_time) as temp_diff
    --from dba_hist_active_sess_history
    from v$active_session_history
    where
    session_id=&1
    and session_serial#=&2
    order by sample_time asc
    =========================================================================
    ---- For global temp usage info
    col sid_serial format a10
    col username format a17
    col osuser format a15
    col spid format 99999
    col module format a15
    col program format a30
    col mb_used format 999999.999
    col mb_total format 999999.999
    col tablespace format a15
    col statements format 999
    col hash_value format 99999999999
    col sql_text format a50
    col service_name format a15
    prompt
    prompt #####################################################################
    prompt #######################LOCAL TEMP USAGE#############################
    prompt #####################################################################
    prompt
    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;
    prompt
    prompt #####################################################################
    prompt #######################LOCAL TEMP USERS#############################
    prompt #####################################################################
    prompt
    SELECT S.sid || ',' || S.serial# sid_serial, S.username, S.osuser, P.spid,
    --S.module,
    --P.program,
    s.service_name,
    SUM (T.blocks) * TBS.block_size / 1024 / 1024 mb_used, T.tablespace,
    COUNT(*) statements
    FROM v$tempseg_usage T, v$session S, dba_tablespaces TBS, v$process P
    WHERE T.session_addr = S.saddr
    AND S.paddr = P.addr
    AND T.tablespace = TBS.tablespace_name
    GROUP BY S.sid, S.serial#, S.username, S.osuser, P.spid,
    S.module,
    P.program,
    s.service_name,TBS.block_size, T.tablespace
    ORDER BY mb_used;
    --prompt
    --prompt #####################################################################
    --prompt #######################LOCAL ACTIVE SQLS ############################
    --prompt #####################################################################
    --prompt
    -- SELECT sysdate "TIME_STAMP", vsu.username, vs.sid, vp.spid, vs.sql_id, vst.sql_text,vsu.segtype, vsu.tablespace,vs.service_name,
    -- sum_blocks*dt.block_size/1024/1024 usage_mb
    -- FROM
    -- SELECT username, sqladdr, sqlhash, sql_id, tablespace, segtype,session_addr,
    -- sum(blocks) sum_blocks
    -- FROM v$tempseg_usage
    --     group by username, sqladdr, sqlhash, sql_id, tablespace, segtype,session_addr
    -- ) "VSU",
    -- v$sqltext vst,
    -- v$session vs,
    -- v$process vp,
    -- dba_tablespaces dt
    -- WHERE vs.sql_id = vst.sql_id
    -- AND vsu.session_addr = vs.saddr
    -- AND vs.paddr = vp.addr
    -- AND vst.piece = 0
    -- AND vs.status='ACTIVE'
    -- AND dt.tablespace_name = vsu.tablespace
    -- order by usage_mb;
    --prompt
    --prompt #####################################################################
    --prompt #######################LOCAL TEMP SQLS##############################
    --prompt #####################################################################
    --prompt
    --SELECT  S.sid || ',' || S.serial# sid_serial, S.username, Q.sql_id, Q.sql_text,
    --T.blocks * TBS.block_size / 1024 / 1024 mb_used, T.tablespace
    --FROM    v$tempseg_usage T, v$session S, v$sqlarea Q, dba_tablespaces TBS
    --WHERE   T.session_addr = S.saddr
    --AND     T.sqladdr = Q.address
    --AND     T.tablespace = TBS.tablespace_name
    --ORDER BY mb_used;
    --

  • Increasin the temp tablespace

    Hello All,
    I am using Oracle 11g R2 i want to increase the temp tablespace size. can i use the below command? can i increase while the database is open and some queries are running and use the temp table space?
    ALTER DATABASE TEMPFILE '....../datafile/name_datafile.tmp' RESIZE 100M
    Regards,

    Hello,
    I am using Oracle 11g R2 i want to increase the temp tablespace size. can i use the below command? can i increase while the database is open and some queries are running and use the temp table space?Why do you intend to extend the Temporary Tablespace ? Do you have any ORA-01652 error ?
    If not, may be it's not necessary to extend it. Even if it seems to be full Free Extents are reused.
    ALTER DATABASE TEMPFILE '....../datafile/name_datafile.tmp' RESIZE 100MYes you can use this statement, but be aware that the Size specified (here 100 Mo) is the target size not the supplemental size.
    Hope this help.
    Best regards,
    Jean-Valentin

Maybe you are looking for