Adding Temp tablespace to physical stand by database?

I am getting the below error when i try to load data using SQL loader from physical stand by database to another database after making the physical stand by database in read only mode.
ORA-25153: Temporary Tablespace is Empty.
On primary database when i query
SQL>select ts#,name from v$tablespace;
TS# NAME
2 TEMP
On physical stand by when i query
SQL>select ts#,name from v$tablespace;
TS# NAME
2 TEMP
On primary DB when i query
select name from v$tempfile where ts#=2;
NAME
/dev/vx/rdsk/oradata/tempfile0101
On standby when i query
SQL>select name from v$tempfile where ts#=2;
no rows selected
At this point do i need to add datafile to the TEMP tablespace of stand by database or just need to add TEMP tablespace to stand by database.?
DB version:9.2.0.6
Thank You all...

Can you make sure that /dev/vx/rdsk/oradata/tempfile0101 is copied to standby site during the standby creation. Often it happens that the hot backups are copied to standby ste and generally they dont contain temp files. If the files is present , then i'll suggest you to do a quick bounce of standby instance to make sure that controlfile attempted to access it. You can also try recreating the standby control file on promary and copy it to standby site along with the tempfile and start the instance with new control file.
If you want to add temp files to the standby instance, the only option you have is to add them on primary site. If you have standby_file_management as auto they will get copied over. If not you can copy the files to standby instance and restart the recovery.
Please let us know if any of the hints are applicable to your case.
-Ravi

Similar Messages

  • Can we run application services when physical stand by database is in read

    can we run application services when physical stand by database is in read only mode
    i Want to up the EBS application services and check login when phyiscal standby database is in read only mode.
    Is it possible? for checking dataguard database application as well.

    but i just want to know that can i start EBS application services and nagivate the application.Without distrubing my primary database and application.You should not do as the moment you open the standby database it becomes invalid.
    Thanks,
    Hussein

  • Archival process not running on physical stand by

    for physical stand by database we dont have archival process not running. but both primary and stand by database are in sync.
    though log_archive_max_processes is set 2.
    any help appriciated.

    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE 10.2.0.4.0 Production
    TNS for Linux: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    and
    select process, client_process, sequence#, status from v$managed_standby;
    PROCESS CLIENT_P SEQUENCE# STATUS
    MRP0 N/A 4930 WAIT_FOR_LOG
    RFS UNKNOWN 0 IDLE
    it doesnt shiw any archival process running.

  • PDB without local TEMP Tablespace

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

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

  • Open stand by database to run scripts

    hello all,
    I am having one physical stand by database which is synchronized with production database.Now i am have some scripts which extracts data.But i want to run this scripts on stand by database which is in recovery mode.Now i want to make the stand by database in read only mode and after executing the scripts make it back to stand by database in recovery mode.My plan to make the stand by database is as follows.
    SQL>connect / as sysdba
    SQL>recover managed standby database cancel;
    SQL>alter database open;
    Now i want to make it back to physical standby database and my plan is as below.
    SQL>connect / as sysdba
    SQL>shutdown immediate;
    SQL>alter database mount standby database;
    SQL>recover managed standby database disconnect;
    Will the above scripts run for my purpose.I don't have a test server to test it.
    DB version:9.2.0.6
    Thank You All...

    First off, I would say that not having a test environment to test this sort of thing is exceptionally short-sighted. If the database is important enough to go through the effort of setting up a physical standby, it is well worth having a proper test environment so that you can test scripts before applying it to production.
    Second, you will want to review the documentation for [opening a physical standby database for read-only access|http://download.oracle.com/docs/cd/B10501_01/server.920/a96653/manage_ps.htm#1014483] which walks through a different set of steps than you have outlined here. I wouldn't dream of running the documented script on a production environment, though, without having first run it in some sort of test environment.
    Justin

  • What should be idea temp tablespace size ?

    HI all
    My databases size in between 20 gb to 100gb. waht factor should i consider to fix the temp tablespace size ?
    What should be my ideal temp tablespace size for the both database ?

    Arun Rao wrote:
    HI all
    My databases size in between 20 gb to 100gb. waht factor should i consider to fix the temp tablespace size ?
    What should be my ideal temp tablespace size for the both database ?what is the version?
    Temp size wont depends on database size, It purely depends on user sortings. Create the temporary tablespace with autoextend upto maxsize of 32gb approx & see how users performing sortings.
    >
    Handle:      Arun Rao
    Status Level:      Newbie
    Registered:      Jul 4, 2010
    Total Posts:      10
    Total Questions:      8 (7 unresolved)
    Name      Arun Rao
    Location      Mumbai
    Occupation      DBA
    >
    7 out of 8 unanswered, if already answered why cant you close those threads? Keep the forum clean.
    Edited by: CKPT on Jul 2, 2012 2:46 PM

  • Physical stand by configuration

    Hi Experts,
    Please help me with the below issue:
    1) I have configured a physical stand by database on windows with oracle 10g. It is working and redo apply is enable at mount stage. Now here on mount stage i have to run manually commands to check reports like.. redo applied, pending, status etc. I want to do it with job. My requirement is to configure all queries in a job so that i can receive auto report in my mail every two hours. Please check and help.
    2) We do servers shutdown in night and up in the morning. When i up my physical stand by server and check the status it is in open mode. I have to shut and start again on mount stage and have to start redo apply again by command firing. I need to maintain it with a script so that in the morning when my physical standby server goes up it will auto come at mount stage and redo apply should enable auto and after that i receive reports of synchronization with primary server in my mail as per point no. one. Please help.

    +1) I have configured a physical stand by database on windows with oracle 10g. It is working and redo apply is enable at mount stage. Now here on mount stage i have to run manually commands to check reports like.. redo applied, pending, status etc. I want to do it with job. My requirement is to configure all queries in a job so that i can receive auto report in my mail every two hours. Please check and help.+
    Primary:
    SETEP -1
    ========
    LOGIN TO THE PRIMIREY SERVER
    $ su - orapr1
    Password:
    STEP -2
    =======
    GET THE SEQUENCE MAX FROM V$LOG_HISTORY
    SQL> select max(sequence#) from v$log_history;
    MAX(SEQUENCE#)
    76968
    SQL> alter system switch logfile;
    System altered.
    SQL> select max(sequence#) from v$log_history;
    MAX(SEQUENCE#)
    76969
    SQL> exit
    =========================================
    ON STANDBY SERVER:
    $ ps -ef|grep pmon
    oratst 2978 1 0 Sep 08 ? 147:34 ora_pmon_amantst
    oracle 3039 1 0 Sep 08 ? 137:34 ora_pmon_airman
    e460269 16109 16104 0 18:54:44 pts/1 0:00 grep pmon
    $ su - oracle
    Password:
    mesg: cannot change mode
    $ sqlplus
    SQL*Plus: Release 10.2.0.3.0 - Production on Thu May 17 18:55:10 2012
    Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
    Enter user-name: /as sysdba
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> select max(sequence#) from v$log_history;
    MAX(SEQUENCE#)
    8548
    SQL> select max(sequence#) from v$log_history;
    MAX(SEQUENCE#)
    8549
    SQL> select * from v$archive_gap;
    SQL> select sequence#, archived, applied, status from v$archived_log;
    http://shanojkumar.wordpress.com/2012/05/23/oracle-best-practice-primary-and-standby-archive-crosscheck/
    +2) We do servers shutdown in night and up in the morning. When i up my physical stand by server and check the status it is in open mode. I have to shut and start again on mount stage and have to start redo apply again by command firing. I need to maintain it with a script so that in the morning when my physical standby server goes up it will auto come at mount stage and redo apply should enable auto and after that i receive reports of synchronization with primary server in my mail as per point no. one. Please help.+
    Temporarily disabling the log shipping to standby database
    $ sqlplus
    SQL*Plus: Release 10.2.0.3.0 - Production on Wed Jul 25 21:07:57 2012
    Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
    Enter user-name: /as sysdba
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> select name,open_mode from v$database;
    NAME OPEN_MODE
    AIRMAN READ WRITE
    SQL> select max(sequence#) from v$log_history;
    MAX(SEQUENCE#)
    8941
    SQL> alter system switch logfile;
    System altered.
    SQL> select max(sequence#) from v$log_history;
    MAX(SEQUENCE#)
    8942
    SQL> select status, DEST_NAME, DESTINATION from v$archive_dest where status = 'VALID';
    STATUS
    DEST_NAME
    DESTINATION
    VALID
    LOG_ARCHIVE_DEST_1
    /u01/oradata/airman/archive
    VALID
    LOG_ARCHIVE_DEST_2
    airman_sj
    STATUS
    DEST_NAME
    DESTINATION
    SQL> show parameter LOG_ARCHIVE_DEST_2
    NAME TYPE VALUE
    log_archive_dest_2 string SERVICE=airman_sj LGWR ASYNC V
    ALID_FOR=(ONLINE_LOGFILE, PRIM
    ARY_ROLE) db_unique_name=airma
    n_sj
    SQL> show parameter log_archive
    NAME TYPE VALUE
    log_archive_config string DG_CONFIG=(airman_kj,airman_sj
    log_archive_dest string
    log_archive_dest_1 string LOCATION=/u01/oradata/airman/a
    rchive VALID_FOR=(ALL_LOGFILES
    , ALL_ROLES) db_unique_name=ai
    rman_kj
    log_archive_dest_10 string
    log_archive_dest_2 string SERVICE=airman_sj LGWR ASYNC V
    ALID_FOR=(ONLINE_LOGFILE, PRIM
    ARY_ROLE) db_unique_name=airma
    NAME TYPE VALUE
    n_sj
    log_archive_dest_3 string
    log_archive_dest_4 string
    log_archive_dest_5 string
    log_archive_dest_6 string
    log_archive_dest_7 string
    log_archive_dest_8 string
    log_archive_dest_9 string
    log_archive_dest_state_1 string enable
    log_archive_dest_state_10 string enable
    log_archive_dest_state_2 string ENABLE
    log_archive_dest_state_3 string enable
    log_archive_dest_state_4 string enable
    log_archive_dest_state_5 string enable
    log_archive_dest_state_6 string enable
    log_archive_dest_state_7 string enable
    log_archive_dest_state_8 string enable
    log_archive_dest_state_9 string enable
    log_archive_duplex_dest string
    log_archive_format string %t_%s_%r.arc
    log_archive_local_first boolean TRUE
    log_archive_max_processes integer 2
    log_archive_min_succeed_dest integer 1
    log_archive_start boolean FALSE
    log_archive_trace integer 0
    SQL> alter system set log_archive_dest_state_2=defer scope=both;
    System altered.
    SQL> show parameter log_archive_dest_state_2
    NAME TYPE VALUE
    log_archive_dest_state_2 string DEFER
    SQL> select max(sequence#) from v$log_history;
    MAX(SEQUENCE#)
    8942
    SQL> alter system switch logfile;
    System altered.
    SQL> select max(sequence#) from v$log_history;
    MAX(SEQUENCE#)
    8943
    SQL> alter system switch logfile;
    System altered.
    SQL> select max(sequence#) from v$log_history;
    MAX(SEQUENCE#)
    8944
    SQL> alter system switch logfile;
    System altered.
    SQL> select max(sequence#) from v$log_history;
    MAX(SEQUENCE#)
    8945

  • Doubt in considering temp tablespace's free space

    Hi All,
    Database: oracle 11.2
    Operating System: AIX
    I want to know how much free space available in my temp tablespace
    I ran below scripts
    select sum((bytes_free)/1024/1024/1024) GB from v$temp_space_header
    +52.904296875+
    select (tablespace_size)/1024/1024/1024 tablespace_size_in_gb,
    +(allocated_space)/1024/1024/1024 allocated_space_in_gb,+
    +(free_space)/1024/1024/1024 free_space_in_gb+
    from dba_temp_free_space
    tablespace_size_in_gb: 98.9990234375
    allocated_space_in_gb: 46.0947265625
    free_space_in_gb:151.81640625
    So my doubt is which one from above two script gives actual free space information ?
    Also in dba_temp_free_space view why free space size > tablespace size ?

    v$temp_space_header shows you how big the temp tablespace has got since the database was restarted. It doesn't give you the current free/used space.
    See the link for dba_temp_free_space, but I think it may be the way it reports free space which is why you're seeing it as more than the actual tablespace. As you can see form the description "space that is currently allocated and available for resuse" is calculated for both allocated space and free space.
    http://docs.oracle.com/cd/B28359_01/server.111/b28320/statviews_5056.htm
    >
    ALLOCATED_SPACE = space that is currently allocated and used + space that is currently allocated and available for reuse
    FREE_SPACE = space that is currently allocated and available for reuse + space that is currently unallocated>
    I use the below script which I've plagiarised from somewhere ages ago to get the used/free temp space.
    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;

  • CMS Repository Database Temp Tablespace Sizing

    1.  While running some large reports Business Objects (XI 3.1 FP2.7) received an ORA-01652 (Unable to extend temp segment in tablespace TEMP) error for the CMS repository.  The CMS database is running in an independent Oracle instance with the auditing database, so only the Business Objects engine would be using the temp tablespace.  All the report information is extracted from other database instances.  This tablespace was sized at 4GB when this error occurred.
    2.  What is Business Objects using the CMS repository temp tablespace for?  What are some sizing guidelines, should this tablespace be sized based on estimated report sizes, report rows, concurrent users, etc?

    I'd say this has nothing to do with Webi processing and has everything to do with your Auditing DB.
    Auding DB always growing and that's where that message comes.
    Audit guide has more info on managing Audit DB.

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

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

  • Temp tablespace full at startup

    Hi,
    my temp tablespace appears full at database startup. I know it is full because the collecting statistics process can not be executed since temp tablespace can not grow (autoextend off). I had to add another temp datafile to get the statistics but first one continues full after each restart.
    Is this any signal of malfunction?
    Thanks for all.
    Greetings.

    ok. I think all is understood.
    DBMS_STATS.GATHER_SCHEMA_STATS probably needed more disk than 1.5 GB (my old temp tablespace), so the result was
    ERROR en línea 1:
    ORA-01652: no se ha podido ampliar el segmento temporal con 128 en el
    tablespace TEMP
    ORA-06512: en "SYS.DBMS_STATS", línea 9136
    ORA-06512: en "SYS.DBMS_STATS", línea 9616
    ORA-06512: en "SYS.DBMS_STATS", línea 9800
    ORA-06512: en "SYS.DBMS_STATS", línea 9854
    ORA-06512: en "SYS.DBMS_STATS", línea 9831
    ORA-06512: en línea 1
    Then adding new datafile (1.5 GB more) process could finish. Database continues growing, process always had finished not yesterday: the day of needing full temp tablespace came.
    Tell me if I am wrong.
    Thanks a lot.

  • Temp tablespace issue

    Hi,
    We are facing continuous problem of slow performance in some applications...i found that temp tablespace is becoming full frequently...so after that reports are getting delayed..is there any permanent fix for this problem..
    We have recreated the temp tablespace...
    Regards,
    Joshua

    Hi,
    pls find the details...
    VERSION:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE 10.2.0.4.0 Production
    TNS for Linux: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    some info abt temp tablespace:
    TABLESPACE_NAME BYTES_COALESCED EXTENTS_COALESCED PERCENT_EXTENTS_COALESCED BLOCKS_COALESCED PERCENT_BLOCKS_COALESCED
    TEMP_SCHEMA_USR 50724864 2 100 6192 100
    is that means coalescing would solve the problem ?...
    We have some limitation that we cant control the users since they are very critical in operation...
    Is Adding datafile will solve the problem(bcoz b4 sometime i added one file....no improvement)...

  • Temp tablespace 99%full

    What are the suggestion for temp tablespace, if its 99%full, should we keep adding space in it or it will use existing space?
    TABLESPACE TOTAL_MB USED_MB FREE_MB PCT_USED GRAPH (X=5%)
    TEMP 17,500.00 17,444.00 56.00 99.68 [XXXXXXXXXXXXXXXXXXX-]

    Hi,
    >>What are the suggestion for temp tablespace, if its 99%full, should we keep adding space in it or it will use existing space?
    I think that you don't need worry about, unless you're receiving some ORA- error about out of space in TEMP tablespace. You can see below an SQL output from a database used here in my company for development and tests purposes. The database is up uninterruptedly by 7 months and the space size for the TEMP tablespace have been configured to use 900 MB.
    LEGATTI@ORACLE10> SELECT tablespace_name, SUM(bytes_used), SUM(bytes_free)
      2  FROM   V$temp_space_header
      3  GROUP  BY tablespace_name;
    TABLESPACE_NAME                SUM(BYTES_USED) SUM(BYTES_FREE)
    TEMP                                 943718400               0Cheers
    Legatti

  • Droping TEMP tablespace

    hi folks,
    i have a production database in a high traffic environment base on oracle 8.1.7.0.0
    i lost TEMP tablespace's datafile because of that i just offlined the tablespace ( just one datafile per tablespace TEMP ) but i can not drop or add a datafile to this tablespace.
    i just added a TEMPX tablespace and changed TEMPORARY TABLESPACE of users to use this new temporary tablespace.
    really how can i renew TEMP tablespace?
    thanks in advanced

    Well, the tablespace's offline. ok. Is it a TEMPORARY TABLESPACE or a PERMANENT with TEMPORARY option?
    Can you issue the queries:select tablespace_name,file_name from dba_temp_files where tablespace_name='TEMP';
    select tablespace_name,file_name from dba_data_files where tablespace_name='TEMP';to check this?
    OEM show the used space because it checks in some data dictionary views which still contains info about the TEMP tablespace.
    You should really try dropping the datafile/tempfile first via "ALTER DATABASE DATAFILE 'filename' OFFLINE DROP" before dropping the tablespace.
    You should also check the status of the session in which you drop the tablespace before cancelling. It may take some time to complete.

Maybe you are looking for