Reducing Temp Tablespace

Hi,
I need some help with the temp tablespace on an express edition. I have an express edition running under windows 2003 Server and the temp tablespace has increased very large (>4 GB). I have tried to reduce the datafile with 'alter database datafile 'C:\ORACLEXE\ORADATA\XE\TEMP.DBF' resize 2048M;' but I always get the message 'FEHLER in Zeile 1:
ORA-01516: Nicht vorhandene Log-Datei, Datendatei oder temporΣre Datei
'C:\ORACLEXE\ORADATA\XE\TEMP.DBF' even if the path is correct (I have verified it many times).
Is there an possibility to reduce the temp tablespace or is the only possibility to create a new default temp tablespace and delete the old one. If I create a new temp tablespace, can I use the maxsize option?
Many thanks in advance for all your help.
Kind regards
Luis Varon

create a new default temp tablespace and delete the old one.Yes, do that.
can I use the maxsize option?You can, but even better, do not specify AUTEXTEND ON (OFF is the default).

Similar Messages

  • Temp tablespace 98% full

    Hy
    My temp tablespace (1 GB) is 98% full.
    A.)How can I find out which user uses at a certain point of time in percent the tablespace.
    B.)Does a full temp tablespace lead to performance problems reduces the "reply velocity" of a database
    lutz
    null

    Lutz,
    a) By using the following query you can determine who are all the users who have created their objects in TEMP tablespace..
    SQL> SELECT OWNER, SEGMENT_NAME, SEGMENT_TYPE
    from dba_segments
    where tablespace_name like 'TEMP';
    Once u get the names of the objects u can move to the tablespace u want.
    b). According to me YES. Try to restart the database after moving the objects if any.. and this should give some space to u.
    There is a bug in 8.1.6 related to the use of TEMP tablespace while using the sort operations.. Check it if u r using 8.1.6
    Hope this helps,
    Shiva
    null

  • Windows Server batch to resize TEMP tablespace.

    I was wondering if it's possible to use windows server 2003 batch jobs to RESIZE TEMP tablespace.
    Here are some details:
    Windows Server 2003
    Oracle 10gR2
    We do a windows batch job to backup all files on Oracle directory (.ctl, .dbf, etc) to a different server. With autoextend on, the TEMP.dbf gets to be really big. What I am wanting to do is reduce the size of the TEMP.dbf before backing up the files - to reduce the back up time.
    Since alter database tempfile 'c:\oracle\...' RESIZE 10M is a SQL command; is there a way I can resize it through the windows batch job? If so, mind pointing me the way?
    Thanks.

    a) Consider using RMAN for backup
    b) Don't backup temp tablespace
    c) Are Temporary tabesspaces Backed Up

  • TEMP tablespace increasing

    I have a problem with storage space of my default temporary table space.
    For my application, I specified the default table space as "DEFTBSPACE" with size 4000MB and temporary table space as "TEMP" with size 14486MB. Now, my usage of my temporary table space is increasing rapidly (Now, the used temp tablespace is 14485MB almost 99.99%). What could be the reason..? Is there any thing going into TEMP tablespace by mistake?.
    Please help.
    Reagrds,
    Satish.

    Can we deallocate manually the data file or a part of the datafile so that the usage space is reduced. What's the solution to reduce the usage space of this TEMP tablespace.If you bounce the db, you will get all used space.
    I heared, dropping and recreating the TEMP tablespace is the only the solution for this..??Is it true?
    Yes it is absolutely true.
    Create another temp tabelspace and set as default temp tablespace and drop the previous one. However, make sure no one is currently using that temp tablespace.
    The reason that you haven't get any result query v$sort_usge is that no one is using temp currently.
    You can also use v$tempseg_usage.
    Jaffar
    OCP DBA

  • 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

  • TEMP tablespace fills up quickly

    Hi All,
    I know this is a very classic question.
    In my client, we run annual reports during 1-2 days a year and the TEMP tablespace gets filled up very quickly.
    What is the best practice of managing the TEMP tablespace size in a very busy database. (Oracle Applications is running)
    Thanks,
    Sinan Topuz

    A temporary tablespace contains transient data that persists only for the duration of the session. Temporary tablespaces can improve the concurrency of multiple sort operations, reduce their overhead, and avoid Oracle Database space management operations. A temporary tablespace can be assigned to users with the CREATE USER or ALTER USER statement and can be shared by multiple users.
    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.
    You cannot explicitly create objects in a temporary tablespace.
    Please note all this point.

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

Maybe you are looking for

  • How do I use iTunes gift card on ipad mini?

    I have followed directions, but when I go to redeem it asks for my id and when I put that in it says I have no cc on file, which I don't bec I am trying to use an iTunes gift card. How can I use the gift card on my mini?

  • Updating files crash - no more information, but need to know what file causes it

    Hello everyone! I'm not sure where exactly to look for an answer, so here is what happens. My version is RoboHelp 9.0.1.262. Documentation department writes help, then it is translated and then I need to compile translated online help. I take transla

  • Transferring Images to SD Card - iBook Freezes

    I'm trying to move photos from iPhoto 5 to a Kodak 512MB SD Card via a USB card reader. Trying to move about 320 images (approx 480MB). The iBook freezes every time I try to copy the files across. iBook is a G4 with 1GB RAM. I've tried to load them a

  • Apple Wireless Keyboard won't pair with iMac...

    I just bought a new 27" iMac and had customized and shipped from Apple (didn't buy it off the shelf in the Apple Store). When the new iMac got here today, I connected it to my aftermarket (wired USB) keyboard and trackball. It works fine. My problem

  • Windows O/S running in the virtual machine has frozen does not want to shut down

    Our old Windows-based PC is a virtual machine on our iMac (it is accessed using VMWare Fusion 2). The Windows XP Home Edition O/S froze when booting, and cannot be shut down by sending a Ctrl-Alt-Del or Force Quitting VMWare Fusion. Putting the iMac