ORA-01652 ERROR

When the Data is loading from DSO --> Info Cube. I'm getting following ERROR message.
ERROR Message
Error while extracting from source ZOPA_O01 (type InfoProvider)
ORA-01652: unable to extend temp segment by 128 in tablespace PSAPTEMP
Error reading the data of InfoProvider ZOPA_O01
Thanks for your help in advance

Hi,
Tablespace PSAPTEMP is full. You need to extend this tablespace. Tell your Basis team to do that. It can be done by 2 ways.
This can be done by using BR*Tools-->
Resize old datafile or add a new datafile to current tablespace.
Hope this helps.
Thanks,
Sushil

Similar Messages

  • SIL_PartyPersonDimension_SCDUpdate failing with ORA-01652 error

    Hi ,
    SIL_PartyPersonDimension_SCDUpdate is failing with following error :
    ORA-01652: unable to extend temp segment by 128 in tablespace TEMP
    I get following solution in net
    add $$HINT1 , $$HINT2 , $$HINT3 parameters as
    $$HINT1 = /*+ USE_NL(TARGET_TABLE SCD_HISTORY)*/
    $$HINT2 = /*+ USE_NL(SCD_OUTER DELTA_TABLE)*/
    $$HINT3 = /*+ INDEX(DELTA_OUTER W_PARTY_PER_D_T1_TEST_AK)*/
    I do not see the inde x W_PARTY_PER_D_T1_TEST_AK in the table , so not sure it this works
    can you please tell me the solution if you have encountered the issue ,
    I am using 7.9.6.2

    Hi,
    This error is due to tablespace issue in database, ask your dba to increase the tablespace for the schema which you are using to load the data in the target db.
    Thanks,
    Navin Kumar Bolla

  • Query runs fine in 9i but results to ORA-01652 unable to extend temp in 10g

    Hi,
    We are having issues in running a SQL query in 10g. In 9i, it runs fine with no problems but when run in 10g, It takes forever and the temp tablespace grows very large upto 60GB until we get ORA-01652 error due to lack of disk space. This does not occur in 9i, where query runs in only 20 mins and does not take up temp that big. 9i version is 9.2.0.8. 10g is 10.2.0.3

    Heres the SQL query:
    SELECT
    J2.EMPLID,
    TO_CHAR(J2.EFFDT,'YYYY-MM-DD'),
    J2.EFFSEQ,
    J2."ACTION",
    J2.ACTION_REASON,
    TO_CHAR(J2.GRADE_ENTRY_DT,'YYYY-MM-DD'),
    J2.COMPRATE,
    J2.CHANGE_AMT,
    J2.COMP_FREQUENCY,
    J2.STD_HOURS,
    J2.JOBCODE,
    J2.GRADE,
    J2.PAYGROUP,
    PN2.NATIONAL_ID,
    TO_CHAR(PC.CHECK_DT,'YYYY-MM-DD'),
    SUM(PO.OTH_EARNS),
    To_CHAR(SUM(PO.OTH_EARNS)),
    PO.ERNCD,
    '3',
    TO_CHAR(PC.PAY_END_DT,'YYYY-MM-DD'),
    PC.PAYCHECK_NBR
    FROM PS_JOB J2,
    PS_PERS_NID PN2,
    PS_PAY_OTH_EARNS PO,
    PS_PAY_CHECK PC
    WHERE J2.EMPL_RCD = 0
    AND PN2.EMPLID = J2.EMPLID
    AND PN2.COUNTRY = 'USA'
    AND PN2.NATIONAL_ID_TYPE = 'PR'
    AND J2.COMPANY <> '900'
    AND J2.EFFDT <= SYSDATE
    AND PC.EMPLID = J2.EMPLID
    AND PC.COMPANY = PO.COMPANY
    AND PC.PAYGROUP = PO.PAYGROUP
    AND PC.PAY_END_DT = PO.PAY_END_DT
    AND PC.OFF_CYCLE = PO.OFF_CYCLE
    AND PC.PAGE_NUM = PO.PAGE_NUM
    AND PC.LINE_NUM = PO.LINE_NUM
    AND PC.SEPCHK = PO.SEPCHK
    AND EXISTS (SELECT ERNCD
    FROM PS_P1_CMP_ERNCD P1_CMP
    WHERE P1_CMP.ERNCD = PO.ERNCD AND EFF_STATUS = 'A')
    GROUP BY J2.EMPLID,
    J2.EFFDT,
    J2.EFFSEQ,
    J2.ACTION,
    J2.ACTION_REASON,
    J2.GRADE_ENTRY_DT,
    J2.COMPRATE,
    J2.CHANGE_AMT,
    J2.COMP_FREQUENCY,
    J2.STD_HOURS,
    J2.JOBCODE,
    J2.GRADE,
    J2.PAYGROUP,
    PN2.NATIONAL_ID,
    PC.CHECK_DT,
    PO.ERNCD,
    '3',
    PC.PAY_END_DT,
    PC.PAYCHECK_NBR

  • Error ORA-01652 while running select query

    A select query returning millions of records is returning the following error.
    SQL Error [
    ORA-01652: unable to extend temp segment by 128 in tablespace TEMP
    We requested DBA to increased the TEMP tablespace. He increased it to 20GB and also, changed to Autoextent.
    When we executed the query again, we got the same error ?
    What could be the reason of this issue and how it can be resolved ?

    All sort operations that don't fit into the SORT_AREA_SIZE will go to the temp tablespace (they can be seen as direct writes in the trace file).
    It can easy be the case, that your temp tablespace needs to be many GB in size [we have a table with millions of rows and for the loading/merging our temp is 80GB in size].
    May be you can change your process of loading i.e. with this select you fill a intermediate table (with CTAS) and do your processing there or even try to do the processing in SQL while building the table. You could also try to do the processing with a cursor and BULK COLLECT LIMIT 100 and then inserting into the target table with the FORALL statement.

  • ORA-12008: error in materialized view refresh path with ORA-01652

    I have a temp tablespace with 2 tempfiles of 2GB each (total 4GB) but still refresh of materialized view is failing with following error:
    5646690 - BIS Materialized View Refresh Program
    ORA-12008: error in materialized view refresh path
    ORA-01652: unable to extend temp segment by 128 in tablespace TEMP1
    I checked and temp ts is completly filled
    SQL> select TABLESPACE_NAME, BYTES_USED, BYTES_FREE from V$TEMP_SPACE_HEADER;
    TABLESPACE_NAME BYTES_USED BYTES_FREE
    TEMP1 2147483648 0
    TEMP1 2147483648 0
    My question is how do I find out how much space I need for temp tablespace. what 's the best practise to size temp tablespace when running refresh. refresh is done by client who is submitting a request thru ebiz apps so I 'd like to size it correctly without having to keep guessing.
    Thanks so much in advance for any help

    Hello,
    Temp tablespace size depends how much sort by , order by operation your application performing. You can create new temp tablespace and drop old one with bigger file size
    CREATE  TEMPORARY TABLESPACE TEMP02 TEMPFILE '\mypath_to_temp\TEMP02' SIZE 256M REUSE AUTOEXTEND ON NEXT 256M MAXSIZE 8192M EXTENT MANAGEMENT LOCAL;
    ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMP02;
    Drop tablespace temp including contents; -- Make sure you delete on temp data files.Here is link for your reading purpose
    http://www.idevelopment.info/data/Oracle/DBA_tips/Tablespaces/TBS_3.shtml
    Regards
    Edited by: OrionNet on Mar 6, 2009 6:15 PM

  • DB13 Check and update optimizer stat error: ORA-01652: unable to extend tem

    Hi SAP Gurus,
    When running Check and Update Optimizer Statistics in DB13, an error occurs.
    BR0280I BRCONNECT time stamp: 2011-03-10 06.35.52                    
    BR0301E SQL error -1652 at location stats_tab_collect-16             
    ORA-01652: unable to extend temp segment by 12137 in tablespace SYSTEM
    BR0886E Checking/collecting statistics failed for table SAPR3.ACCTIT 
    BR0280I BRCONNECT time stamp: 2011-03-10 06.36.49                    
    BR0850I 3 of 39479 objects processed - 3.522 of 342.781 units done   
    BR0204I Percentage done: 1.03%, estimated end time: 15:47            
    Looking at tablespace SYSTEM in DB02, the percent used is 58. Auto-extent feature is OFF. Will turning the auto-extent ON, remove the error?

    It seems like Your user (by a mistake) have tablespace SYSTEM as temporary tablespace.
    Connect as sysdba in Your database and check which temp tablespaces awaiable, and size of them:
    select tablespace_name, sum(bytes)/1024/1024 "Size of TEMP TBS in MB" from dba_temp_files  group by tablespace_name;
    Check which users having SYSTEM as tamp-tbs:
    select username, temporary_tablespace from dba_users where temporary_tablespace like 'SYSTEM' order by 1;
    Change those users to have one of your temp-tablespaces:
    alter user &username temporary tablespace &&TempTBS;
    It's also a good idea to have autoextend on on Your temp TBS, but remember to set maxsize so you doesn't fill up your disksystem.
    Hope this solve Your problems.
    Regards
    Audun
    DBA

  • Resolving errors ORA-01652 and ORA-04031

    Hi,
    My database is 8.1.7
    i am frequenty getting this error.
    suggestion required.

    For ORA-01652, check free space in your datafiles.
    For ORA-04031, upgrade to Oracle 8.1.7.4.1 or higher.

  • READER_1_1_1RR_4035SQL Error [ ORA-01652: unable to extend temp segment b

    Hi,
    I am still facing the error for table space evnthough datafile is avl
    READER_1_1_1     RR_4035     SQL Error [
    ORA-01652: unable to extend temp segment by 128 in tablespace TEMP2
    Database driver error...
    Function Name : Execute
    SQL Stmt : SELECT
    ONLINE     DATA     PERMANENT     LOCAL     200     0.063     0.03
    ONLINE     DEV1_BIPLATFORM     PERMANENT     LOCAL     64     44.313     69.24
    ONLINE     DEV1_IAS_TEMP     TEMPORARY     LOCAL     100     0     0
    ONLINE     DEV1_MDS     PERMANENT     LOCAL     100     5.438     5.44
    ONLINE     DEV_BIPLATFORM     PERMANENT     LOCAL     64     44.313     69.24
    ONLINE     DEV_IAS_TEMP     TEMPORARY     LOCAL     100     0     0
    ONLINE     DEV_MDS     PERMANENT     LOCAL     100     5.438     5.44
    ONLINE     EXAMPLE     PERMANENT     LOCAL     975.188     109.125     11.19
    ONLINE     FLA_TBS1     PERMANENT     LOCAL     10     0.063     0.63
    ONLINE     MES_DW2     PERMANENT     LOCAL     2,091.19     1,794.19     85.8
    ONLINE     SYSAUX     PERMANENT     LOCAL     1,245.38     906.938     72.82
    ONLINE     SYSTEM     PERMANENT     LOCAL     3,300.00     2,429.44     73.62
    ONLINE     TEMP     TEMPORARY     LOCAL     24,458.00     5,020.00     20.52
    ONLINE     TOOLS     PERMANENT     LOCAL     1,050.00     0.063     0.01
    ONLINE     UNDOTBS1     UNDO     LOCAL     2,670.00     95.438     3.57
    ONLINE     USERS     PERMANENT     LOCAL     43,530.98     30,366.30     69.76

    No Sense:
    ORA-01652: unable to extend temp segment by 128 in tablespace TEMP2
    tablespace TEMP2
    Database driver error...
    Function Name : Execute
    SQL Stmt : SELECT
    ONLINE     DATA     PERMANENT     LOCAL     200     0.063     0.03
    ONLINE     DEV1_BIPLATFORM     PERMANENT     LOCAL     64     44.313     69.24
    ONLINE     DEV1_IAS_TEMP     TEMPORARY     LOCAL     100     0     0
    ONLINE     DEV1_MDS     PERMANENT     LOCAL     100     5.438     5.44
    ONLINE     DEV_BIPLATFORM     PERMANENT     LOCAL     64     44.313     69.24
    ONLINE     DEV_IAS_TEMP     TEMPORARY     LOCAL     100     0     0
    ONLINE     DEV_MDS     PERMANENT     LOCAL     100     5.438     5.44
    ONLINE     EXAMPLE     PERMANENT     LOCAL     975.188     109.125     11.19
    ONLINE     FLA_TBS1     PERMANENT     LOCAL     10     0.063     0.63
    ONLINE     MES_DW2     PERMANENT     LOCAL     2,091.19     1,794.19     85.8
    ONLINE     SYSAUX     PERMANENT     LOCAL     1,245.38     906.938     72.82
    ONLINE     SYSTEM     PERMANENT     LOCAL     3,300.00     2,429.44     73.62
    ONLINE     TEMP     TEMPORARY     LOCAL     24,458.00     5,020.00     20.52
    ONLINE     TOOLS     PERMANENT     LOCAL     1,050.00     0.063     0.01
    ONLINE     UNDOTBS1     UNDO     LOCAL     2,670.00     95.438     3.57
    ONLINE     USERS     PERMANENT     LOCAL     43,530.98     30,366.30     69.76
    tablespace TEMP2 doesn't exist.
    i used statement
    ALTER TABLESPACE temp
    ADD TEMPFILE 'D:\app\TEMP16.DBF' SIZE 128M autoextend on;
    ALTER TABLESPACE
    USERS ADD DATAFILE 'D:\app\SYS00.DBF' SIZE 1080M autoextend on;
    alter user DATAWAREHOUSE quota unlimited on USERS
    why add datafile in user tablespace¿?
    and you solved the issue doing the same like we told you a few days before in:
    ORA-1652: unable to extend temp segment by 128 in tablespace
    unable to create INITIAL extent for segment in tablespace USERS
    Remember close your threads:
    896398     
    Handle:      896398 
    Status Level:      Newbie
    Registered:      Nov 9, 2011
    Total Posts:      530
    Total Questions:      158 (116 unresolved)

  • Configuring some database parameters because of error:ORA-12801 & ORA-01652

    Hi,
    I have a configuration issue that I really need some help because I don’t understand almost anything about oracle database management and I’m getting the errors:
    ORA-12801:error signaled in parallel query server P0XX
    ORA-01652:unable to extend temp segment by 128 in tablespace TEMPO1I have a server with this configuration:
    SO-HP-UX
    Oracle: 10.2.0.3.0
    CPU’s -12
    Memory:24GB
    Temp01 tablespace: 20GBSome of the parameters:
    Maximum sga memory is 20GB
    db_block_size  8192
    db_cache_size 2147483648
    db_file_multiblock_read_count              32
    db_name            RAID
    dml_locks           2000
    java_pool_size 0
    log_buffer          5242880
    max_enabled_roles      150
    nls_length_semantics   BYTE
    open_cursors   2000
    optimizer_mode             ALL_ROWS
    pga_aggregate_target  3221225472
    processes           2000
    query_rewrite_enabled              TRUE
    query_rewrite_integrity             trusted
    sessions              2205
    sga_max_size   21474836480
    shared_pool_size           117440512
    sort_area_size 65536
    undo_management      AUTO
    undo_retention              7200
    undo_tablespace            UNDOTBS1
    workarea_size_policy   AUTOthe tables where created without nothing special but I did an alter table to do the following:
    alter table XPTO parallel (degree 11);When do I get this error:
    When I try to do a select with a NLSSORT (FIELD, 'nls_sort=binary') AS "KEY1" and it return a few million lines.
    Based on this three articles and a little more reading:
    http://www.dba-oracle.com/oracle_tips_sorts.htm
    http://www.dba-oracle.com/t_parallel_automatic_tuning_pat.htm
    http://www.dbasupport.com/oracle/ora10g/sorting_memory.shtml Should I configure the following parameters with the values that I putted or am I doing something really wrong?
    pga_aggregate_target = 18GB
    _pga_max_size = 18GB
    _smm_px_max_size = 5.4GB
    workarea_size_policy =AUTO
    increase TEMP01 to 40GB
    parallel_automatic_tuning=falseShould I also create a new index for my tables like:
    CREATE INDEX NlSSORT_index ON My_table (NLSSORT (msisdn, 'nls_sort=binary')); because of this queries? I have an index: “msisdn, second_field” that are primary key for all fields.
    Thanks,
    Ricardo Tomás

    Somewhere in your problem you say you altered your table to use parallel 11.
    alter table XPTO parallel (degree 11);{code}Maybe you can try to reduce your degree.<br /><br />Instead of using 11, you could use degree 4.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Although my temporary tablespace is enough space,the error occurs ORA-01652

    Hello,
    Although my temporary tablespace is enough space ,i am taking an error ORA-01652 and some dbfs in the tablespace are looks like as offline and it’s size looks like as 0 byte.
    So that i am changing status of these datafiles to online with this command as follows;
    ALTER DATABASE TEMPFILE '/QDBP/q023/q023/temp/qt_lm_tmp01.dbf' ONLINE;
    Also, The disk that exist these datafiles was 0 in availibility.
    When i issued the command df –k as follows
    Filesystem kbytes used avail capacity Mounted on
    /dev/vx/dsk/qdbpdg/volq23 20971520 20971520 0 100% /QDBP/q023
    is pointed.
    And then i have released space from disk
    The current review is
    /dev/vx/dsk/qdbpdg/volq14 157286400 21731141 127083885 15% /QDBP/q014
    My queries and results are for the hint of about the problem:
    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;
    TABLESPACE |MB_TOTAL| MB_USED| MB_FREE
    QT_LM_TMP |61440 |12| 61428 --temporary
    TS_TEMP_SDPA |15360 |0| 15360 –temporary
    Separately,i want to see you a view about alert log like points below.
    KCF: write/open error block=0x1b6e0a online=1
    file=3 /QDBP/q014/q014/temp/qt_lm_tmp03.dbf
    error=27063 txt: 'SVR4 Error: 28: No space left on device
    Additional information: -1
    Additional information: 8192'
    Automatic tempfile offline due to write error on
    file 3: /QDBP/q014/q014/temp/qt_lm_tmp03.dbf
    With sum,i have some question like below:
    1)Although there is enough space on temporary tablespace why i take error ORA-01652?
    2)Although there is enough space on temporary tablespace why databasefiles have offline status suddenly?
    3) is it important fully rate of disk on operating system if there is enough space on temporary tablespace which has extend properties.
    Best regards
    Oya YALÇIN

    Hi,
    i don't make tablespaces offline mode.But neverthless i don't understant although there is enough space on tablespace why tablespaces are being offline status mode itself?
    When i look at ‘ select file_name,status from dba_temp_files ‘ query on the database now.The result is like below;
    FILE_NAME|STATUS
    /QDBP/q023/q023/temp/qt_lm_tmp01.dbf|AVAILABLE
    /QDBP/q023/q023/temp/qt_lm_tmp02.dbf|AVAILABLE
    /QDBP/q014/q014/temp/qt_lm_tmp03.dbf|AVAILABLE
    /QDBP/q023/q023/temp/ts_temp_sdpa01.dbf|AVAILABLE
    /QDBP/q023/q023/temp/ts_temp_sdpa02.dbf|AVAILABLE
    /QDBP/q014/q014/temp/qt_lm_tmp04.dbf|AVAILABLE
    /QDBP/q014/q014/temp/qt_lm_tmp05.dbf|AVAILABLE
    But when i look at first 3 dbf by orderly from tab of scripts about tablespaces on toad tool
    i see that like below;
    ALTER DATABASE TEMPFILE '/QDBP/q023/q023/temp/qt_lm_tmp01.dbf' OFFLINE;
    ALTER DATABASE TEMPFILE '/QDBP/q023/q023/temp/qt_lm_tmp02.dbf' OFFLINE;
    ALTER DATABASE TEMPFILE '/QDBP/q014/q014/temp/qt_lm_tmp03.dbf' OFFLINE;
    And their size is look like 0 .
    Regards
    Oya.

  • ORA-01652: unable to extend temp segment by 128 in tablespace TEMP2

    Dear all,
    received this error when generate a report.
    check the TEMP1 and TEMP2 they all have lot of spaces.
    check the env $APPLLCSP return empty.
    Please advise how to correct this error.
    Regards,
    Payables: Version : 12.0.0
    APXSSIMP module: Supplier Sites Open Interface Import
    APPLLCSP Environment Variable set to :
    Current NLS_LANG and NLS_NUMERIC_CHARACTERS Environment Variables are :
    American_America.UTF8
    Enter Password:
    REP-0069: Internal error
    REP-57054: In-process job terminated:Terminated with error:
    REP-300: MSG-00001: After SRWINIT
    MSG-00002: After Get_Company_Name
    MSG-00003: After Get_NLS_Strings
    MSG-00004: After Importing Suppliers
    MSG-00005: After Get_Header_Information
    ORA-01652: unable to extend temp segment by 128 in tablespace TEMP2
    ==> SELECT assi.org_id C_Rejected_Org_Id,
    MSG-00020: After SRWEXIT
    Report Builder: Release 10.1.2.0.2 - Production on Mon May 11 09:55:36 2009

    >
    check the TEMP1 and TEMP2 they all have lot of spaces.
    >
    How much is "lot" ? :-) How did you determine this "lot" ?
    Pl see MOS Doc 1025288.6 (How to Diagnose and Resolve UNABLE TO EXTEND Errors)
    HTH
    Srini

  • ORA-01652 due to a SELECT DISTIINCT...ORDER BY

    Hi all,
    the query below fill my 32GB temporary tablespace and I get an ORA-01652.
    SELECT DISTINCT x.nuaud, TO_CHAR (x.times, 'DD/MM/YY HH24:MI'), x.inde1,
                    x.inde2, x.inde3, x.inde4, NVL (y.litab, '????'),
                    NVL (x.useru,
                         SUBSTR (SUBSTR (x.progr, 1, INSTR (x.progr, '.') - 1),
                                 1,
                                 8
                    x.dmlst, x.nublk, x.blkfc, x.nbord, 'A'
               FROM audtab x, audlib y
              WHERE x.cotab = y.cotab(+)
                AND DECODE (y.colan(+), 'A', 1, 0) = 1
                and exists (select 1 from audtri z where z.cotab = x.cotab)
           ORDER BY 1, 12, 10;some informations here:
    SQL> select 'audtab', count(1) from audtab
      2    union all
      3    select 'audlib', count(1) from audlib
      4    union all
      5    select 'audtri', count(1) from audtri;
    'AUDTA   COUNT(1)
    audtab  118804430
    audlib        446
    audtri        219
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - ProductionI added an other datafile of 32GB to my temporary tablespace and now the query has been running for 1 hour and I have 52GB used in my temporary tablespace.
    Below is the monitoring report
    Global Information
    Status              :  EXECUTING
    DBMS_SQLTUNE.REPORT_SQL_MONITOR('1DM3GYMADU2AA')
    Instance ID         :  1
    Session             :  UBXADMIN (102:1880)
    SQL ID              :  1dm3gymadu2aa
    SQL Execution ID    :  16777216
    Execution Started   :  03/05/2010 17:51:19
    First Refresh Time  :  03/05/2010 17:51:23
    Last Refresh Time   :  03/05/2010 18:49:11
    Duration            :  3473s
    Module/Action       :  SQL*Plus/-
    Service             :  REC1128
    Program             :  sqlplus.exe
    DBMS_SQLTUNE.REPORT_SQL_MONITOR('1DM3GYMADU2AA')
    Global Stats
    ======================================================================================
    | Elapsed |   Cpu   |    IO    | Concurrency | Buffer | Read | Read  | Write | Write |
    | Time(s) | Time(s) | Waits(s) |  Waits(s)   |  Gets  | Reqs | Bytes | Reqs  | Bytes |
    ======================================================================================
    |    3617 |     846 |     2771 |        0.05 |     5M | 792K |  75GB |  322K |  61GB |
    ======================================================================================
    SQL Plan Monitoring Details (Plan Hash Value=3110686745)
    ============================================================================================================================================
    ============================================================
    DBMS_SQLTUNE.REPORT_SQL_MONITOR('1DM3GYMADU2AA')
    | Id   |         Operation         |  Name   |  Rows   | Cost |   Time    | Start  | Execs |   Rows   | Read | Read  | Write | Write | Mem
    | Temp | Activity |       Activity Detail           | Progress |
    |      |                           |         | (Estim) |      | Active(s) | Active |       | (Actual) | Reqs | Bytes | Reqs  | Bytes |
    |          |   (%)    |         (# samples)         |          |
    ============================================================================================================================================
    ============================================================
    |    0 | SELECT STATEMENT          |         |         |      |           |        |     1 |          |      |       |       |       |
    |          |          |                             |          |
    | -> 1 |   SORT ORDER BY           |         |     90M |  11M |      2163 |  +1312 |     1 |        0 | 105K |   1GB |  157K |  23GB | 509K
    |  24G |              |                             |          |
    DBMS_SQLTUNE.REPORT_SQL_MONITOR('1DM3GYMADU2AA')
    | -> 2 |    HASH UNIQUE            |         |     90M |   6M |      3471 |     +4 |     1 |      99M | 163K |  38GB | 87547 |  20GB |  49M
    |  29G |        42.58 | Cpu (97)                    |          |
    |      |                           |         |         |      |           |        |       |          |      |       |       |       |
    |          |          | direct path write temp (55) |          |
    |    3 |     HASH JOIN RIGHT OUTER |         |     90M |   1M |      1299 |     +4 |     1 |     119M |      |       |       |       |
    |          |     0.84 | Cpu (3)                     |          |
    |    4 |      TABLE ACCESS FULL    | AUDLIB  |       4 |    3 |         1 |     +4 |     1 |      223 |      |       |       |       |
    |          |          |                             |          |
    |    5 |      HASH JOIN            |         |     90M |   1M |      1301 |     +2 |     1 |     119M |      |       |       |       |
    |          |     2.52 | Cpu (9)                     |          |
    |    6 |       SORT UNIQUE         |         |     217 |    1 |         1 |     +4 |     1 |      218 |      |       |       |       |
    |          |          |                             |          |
    DBMS_SQLTUNE.REPORT_SQL_MONITOR('1DM3GYMADU2AA')
    |    7 |        INDEX FULL SCAN    | AUDTRI2 |     217 |    1 |         1 |     +4 |     1 |      219 |      |       |       |       |
    |          |          |                             |          |
    |    8 |       TABLE ACCESS FULL   | AUDTAB  |    115M |   1M |      1300 |     +3 |     1 |     119M | 521K |  36GB | 77094 |  18GB |
    |          |    54.06 | Cpu (14)                    |     100% |
    |      |                           |         |         |      |           |        |       |          |      |       |       |       |
    |          |          | direct path read (179)      |          |
    ============================================================================================================================================
    ============================================================Have someone an idea of how can this query be tune to generate less sort on disk ?
    Thanks for helping

    the query took 6 hours to complete:
    SQL> SELECT DISTINCT x.nuaud, TO_CHAR (x.times, 'DD/MM/YY HH24:MI'), x.inde1,
      2                  x.inde2, x.inde3, x.inde4, NVL (y.litab, '????'),
      3                  NVL (x.useru,
      4                       SUBSTR (SUBSTR (x.progr, 1, INSTR (x.progr, '.') - 1),
      5                               1,
      6                               8
      7                              )
      8                      ),
      9                  x.dmlst, x.nublk, x.blkfc, x.nbord, 'A'
    10             FROM audtab x, audlib y
    11            WHERE x.cotab = y.cotab(+)
    12              AND DECODE (y.colan(+), 'A', 1, 0) = 1
    13              and exists (select 1 from audtri z where z.cotab = x.cotab)
    14         ORDER BY 1, 12, 10;
    118794436 rows selected.
    Elapsed: 06:01:48.89
    Execution Plan
    Plan hash value: 3110686745
    | Id  | Operation               | Name    | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT        |         |    89M|    21G|       |    11M  (1)| 37:29:22 |
    |   1 |  SORT ORDER BY          |         |    89M|    21G|    22G|    11M  (1)| 37:29:22 |
    |   2 |   HASH UNIQUE           |         |    89M|    21G|    22G|  6305K  (1)| 21:01:07 |
    |*  3 |    HASH JOIN RIGHT OUTER|         |    89M|    21G|       |  1364K  (1)| 04:32:53 |
    |*  4 |     TABLE ACCESS FULL   | AUDLIB  |     4 |   144 |       |     3   (0)| 00:00:01 |
    |*  5 |     HASH JOIN           |         |    89M|    18G|       |  1363K  (1)| 04:32:47 |
    |   6 |      SORT UNIQUE        |         |   217 |  1519 |       |     1   (0)| 00:00:01 |
    |   7 |       INDEX FULL SCAN   | AUDTRI2 |   217 |  1519 |       |     1   (0)| 00:00:01 |
    |   8 |      TABLE ACCESS FULL  | AUDTAB  |   115M|    22G|       |  1363K  (1)| 04:32:39 |
    Predicate Information (identified by operation id):
       3 - access("X"."COTAB"="Y"."COTAB"(+))
       4 - filter(DECODE("Y"."COLAN"(+),'A',1,0)=1)
       5 - access("Z"."COTAB"="X"."COTAB")
    Statistics
          69968  recursive calls
         245941  db block gets
        5209702  consistent gets
       13934882  physical reads
              0  redo size
    SP2-0642: SQL*Plus internal error state 1075, context 1:5:4294967295
    Unsafe to proceed
       87116279  bytes received via SQL*Net from client
        7919631  SQL*Net roundtrips to/from client
              1  sorts (memory)
              1  sorts (disk)
      118794436  rows processedI will ask today the development team about the aim of retrieving 100 millions rows.

  • The Sky is Falling! ORA-01652: unable to extend temp segment by 128

    So we currently have a production problem and I'm not so in the know as a lowly java developer and not an Oracle expert.
    We keep getting this error(below) when a certain heavy query hits the DB.
    Our DBA claims that the tablespace for 'TABLE_SPACE_NAME_HERE' is 20GB of space and that the problem is the query.
    The query has been running fine for many many months but all of a sudden is presenting a problem and we have to do something quick.
    We tried bouncing the application server but the error came right back when the big select query gets hit.
    Any thoughts? Help! : )
    java.sql.SQLException: ORA-01652: unable to extend temp segment by 128 in tablespace TABLE_SPACE_NAME_HERE
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:113)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:754)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:219)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:972)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1074)
         at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:854)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1156)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3415)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3460)
         at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:296)

    LosLobo wrote:
    So, the next question... what is our lesson learned in this case?It depends on the root cause.
    Our DBA thinks 30GB is an unreasonable size for the tablespace and is fingering the select query that was causing the error to occur. Their solution is move to the query to a view and then reduce the tablespace back to 20GB.
    My thoughts are shouldn't the DB be able to handle a query that has been running fine for the last couple years? Also, if we do what is suggested what would prevent another query from coming along and causing the same issue all over again?Has the DBA identified the source of the issue? Did the query plan change? It's possible that something with statistics (or with some configuration change) causes Oracle to believe that two different query plans are roughly equally efficient. One plan might take substantially more TEMP space than another. It's possible that Oracle had been choosing the plan that involved less TEMP space being used and recently changed to preferring the plan that takes more TEMP space. If that's the issue, you may want to force Oracle to use the plan that involves less TEMP usage.
    Regardless of your TEMP tablespace size, another query may come along that causes TEMP to run out of space. Or data growth may cause TEMP to run out of space. Or an increase in the number of users may cause TEMP to run out of space. Ideally, the DBAs would be identifying how much TEMP space is used over the course of the day so that if things are growing steadily additional space can be added as necessary. If TEMP space increases dramatically because a query plan changes, however, even the best monitoring is unlikely to be able to predict that level of growth.
    Whether 30 GB is unreasonable (or whether 20 GB is unreasonable) will depend heavily on your application. We don't know enough to be able to comment. A TB-sized OLTP database serving millions of customers will have very different TEMP requirements than a multi-TB data warehouse which will have very different TEMP requirements than a small department-level application.
    My surmising is we must have just crossed a watermark threshold and the simplest most reasonable solution is to just leave the larger tablespace size.Why do you believe this is the case? It is entirely possible that you need more TEMP because your TEMP usage has been growing slowly over time. It is entirely possible that the query in question has always been using more TEMP space than it really should and that you finally have enough usage to cause the problem to bubble to the surface. It is entirely possible that the query used a reasonable amount of TEMP for the past couple years and suddenly started using far more because of a query plan change. Once you identify the source of the problem, we can figure out the appropriate solution. Without knowing the source of the problem, we're all just guessing.
    Justin

  • ORA-01652: unable to extend temp segment by 128 in tablespace TEMP

    Hi,
    I am getting the following error while executing an insert query.
    ORA-01652: unable to extend temp segment by 128 in tablespace TEMP.
    I have tried increasing the TEMP tbsp size it got resolved temporarily but occurred again after few days.
    When the problem occured, following query shows all insert queries in TEMP tablespace and one of them consumes about 5GB and others are about 24MB.
    SELECT S.sid || ',' || S.serial# sid_serial, S.username,
    T.blocks * TBS.block_size / 1024 / 1024 mb_used, T.tablespace,
    T.sqladdr address, Q.hash_value, Q.sql_text
    FROM v$sort_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 S.sid;
    The insert query is :
    INSERT INTO SEOSDATA (ENTRYID,DOMAINNAME,USERNAME,EVENTTYPE,LOGNAME,TIMSTAMP,SOURCE,COMPUTERNAME,EVENTID,EVENTCATEGORY,SEARCHSTRINGS,MSGTEXT) VALUES (ENTRYID_SEQ.NEXTVAL,:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11)
    It is not expected that an insert query consumes such a huge memory.
    Can someone help me in figuring out what the problem is.
    What might have gone wrong? Seems like sorting is used, why an insert query uses sorting?
    Regards
    Ishu

    Hi,
    Insert statement should not use TEMP tablespace. Please check with following query which user and session id is using TEMP tablespace.
    SELECT b.tablespace, b.segfile#, b.segblk#, b.blocks, a.sid, a.serial#,
    a.username, a.osuser, a.status
    FROM v$session a,v$sort_usage b
    WHERE a.saddr = b.session_addr
    ORDER BY b.tablespace, b.segfile#, b.segblk#, b.blocks;
    Dilipkumar Patel.

  • ORA-12801: error signaled in parallel query server P002

    We are encountering the below problem frequently in SUN SOLARIS BOX
    ORA-12801: error signaled in parallel query server P002
    ORA-01652: unable to extend temp segment by 128 in tablespace TEMP

    Hi,
    This is TEMP tablespace issue.
    1. Identify the query(s) for which it is happening.
    2. Size your TEMP tablespace by monitoring usage of it.
    set lines 200
    column osuser format A20
    column tablespace format A20
    SELECT b.tablespace, b.segfile#, b.segblk#, b.blocks, a.sid, a.serial#,
    a.username, a.osuser, a.status
    FROM v$session a,v$sort_usage b
    WHERE a.saddr = b.session_addr
    and a.osuser = nvl('&osuser',a.osuser)
    ORDER BY b.tablespace, b.segfile#, b.segblk#, b.blocks;
    3. Check all queries have required join conditions or not. Cartezian product of two huge tables creates problem.
    Dilipkumar Patel.

Maybe you are looking for

  • Parsing the xml with out dom parser in Oracle10g

    Hi, I need to parse the xml and create new xml with out any parsers in oracle 10g.Please help me how to do this one.

  • Processing order in a router

    Are there any resource talking about the internal relationship of the processes in a router? For example, the order that NAT process ,routing process and the access-list take effects? Any advice is appreciated. Many thanks!

  • Just installed firefox and msn games plugin is gone & i need it back

    im not sure how to go about this. msn started popping up ie9 ads and hooking itself into my system somehow. while trying to stop the interference from ie9, somehow all the fonts in my browser (ie8) were reduced to the point they a pain to read. i fin

  • Unable to tick batch management

    Dear Expert, I unable to tick batch management with error:"Consignment stocks already exist at the customer's." However,current/previous stock is zero and no open document in MD04. How solve the error? Thank you

  • Terminal word wrap gone?

    One of my favorite features in tiger's terminal was the ability to turn OFF the word wrap. It was under Terminal->Window Settings...->Buffer->Wrap lines that are too long. I could uncheck that box and it would be helpful in viewing logfiles scrolling