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

Similar Messages

  • DB13 Check and Update Optimizer Statistics Error

    Dear Gurus,
    While Updating the Update stats in DB13 Calender it shows the Below mentioned error.
    BR0881I Collecting statistics for table SAPPSU.EKUB with method/sample C ...                           
    BR0280I BRCONNECT time stamp: 2009-01-18 02.23.01                                                      
    BR0884I Statistics collected for table: SAPPSU.EKUB, rows old/new: 4093/6243                           
    BR0280I BRCONNECT time stamp: 2009-01-18 02.23.14                                                      
    BR0883I Table selected to collect statistics after check: SAPPSU.EQBS (4288797/6962268)                
    BR0280I BRCONNECT time stamp: 2009-01-18 02.23.14                                                      
    BR0881I Collecting statistics for table SAPPSU.EQBS with method/sample E/P3 ...                        
    BR0280I BRCONNECT time stamp: 2009-01-18 02.23.28                                                      
    BR0301E SQL error -25153 at location stats_tab_collect-16
    ORA-25153: Temporary Tablespace is Empty
    BR0886E Checking/collecting statistics failed for table SAPPSU.EQBS                                    
    BR0280I BRCONNECT time stamp: 2009-01-18 02.23.30                                                      
    BR0883I Table selected to collect statistics after check: SAPPSU.ESLH (278/420)                        
    BR0280I BRCONNECT time stamp: 2009-01-18 02.23.30                                                      
    BR0881I Collecting statistics for table SAPPSU.ESLH with method/sample C ...                           
    BR0280I BRCONNECT time stamp: 2009-01-18 02.23.30                                                      
    BR0884I Statistics collected for table: SAPPSU.ESLH, rows old/new: 278/420                             
    BR0280I BRCONNECT time stamp: 2009-01-18 02.24.19                                                      
    BR0883I Table selected to collect statistics after check: SAPPSU.HRS1210 (13400/25026)                 
    BR0280I BRCONNECT time stamp: 2009-01-18 02.24.19                                                      
    BR0881I Collecting statistics for table SAPPSU.HRS1210 with method/sample E/P30 ...                    
    BR0280I BRCONNECT time stamp: 2009-01-18 02.24.19                                                      
    BR0884I Statistics collected for table: SAPPSU.HRS1210, rows old/new: 13400/13400                      
    BR0986W Index SAPPSU.HRS1210~0 is unbalanced - please rebuild the index                                
    BR0280I BRCONNECT time stamp: 2009-01-18 02.24.38                                                      
    BR0883I Table selected to collect statistics after check: SAPPSU.JGTBP00 (75747/117862)                
    BR0280I BRCONNECT time stamp: 2009-01-18 02.24.38                                                      
    BR0881I Collecting statistics for table SAPPSU.JGTBP00 with method/sample E/P10 ...                    
    BR0280I BRCONNECT time stamp: 2009-01-18 02.24.39                                                      
    BR0884I Statistics collected for table: SAPPSU.JGTBP00, rows old/new: 75747/106197                     
    BR0280I BRCONNECT time stamp: 2009-01-18 02.24.40                                                      
    BR0883I Table selected to collect statistics after check: SAPPSU.JGTGPNR (76144/117862)                
    BR0280I BRCONNECT time stamp: 2009-01-18 02.24.40                                                      
    Please help me to sort out this issue.
    Thanks
    Anbu

    Hello Anbu,
    the reason for this error is that you have no TEMPFILEs in your temporary tablespace (usually PSAPTEMP).
    Please add one with the BR*Tools:
    http://help.sap.com/saphelp_nw70/helpdata/de/1b/d20f6fe45a9e43b1856ea1b52c9612/content.htm
    Regards
    Stefan

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

  • Check and Update  Optimizer Statistics Error

    Hello,
    I have scheduled 'Check and Update  Optimizer Statistics' from DB 13 but I always get this error.
      BR0280I BRCONNECT time stamp: 2009-01-05 01.00.46
      BR0301E SQL error -20000 at location stats_ind_collect-3, SQL statement:
      'BEGIN DBMS_STATS.GATHER_INDEX_STATS (OWNNAME => '"SAPSR3"', INDNAME => '"/BIC  /B0000412000KE"', ESTIMATE_PERCENT => 30, DEGREE => NULL, NO_INVALIDATE => FALSE); END;'
      ORA-20000: index "SAPSR3"."/BIC/B0000412000KE"  or partition of such index is in unusable state
      ORA-06512: at "SYS.DBMS_STATS", line 10610
      ORA-06512: at "SYS.DBMS_STATS", line 10645
      ORA-06512: at line 1
      BR0886E Checking/collecting statistics failed for index SAPSR3./BIC/B0000412000KE
    Tried checking the table /BIC/B0000412000KE and got this from the check:
      Enhancement category for table missing
      Enhancement category for include or subtype missing
      Table /BIC/B0000412000 was checked with warnings
    I am still checking what this means but appreciate you have any idea on how to solve it.
    Thank you.
    Best Regards,
    Julius
    Edited by: Julius Baron Manuel on Jan 7, 2009 7:39 AM

    Hi Julius,
    Have your tried scheduling the update stats via DB13 'Immediately'. ??? Does it still gives you the same error when its done 'immediately'?
    Try out DB02 and check your whole Database along with missing indexes. Refresh database and update histories.
    Regards,
    Pranay

  • Error: ORA-01652: Unable to extend temp segment by 128

    Hello.
    The error occured when I tried to execute a complex query. I saw that my temp file is 30GB and it's hard to believe that it's getting full by this query!!!
    There is an analytic function used in the query and probably it is causing the huge need of space. Here is the execution plan of the query:
    SELECT STATEMENT, GOAL = CHOOSE               Cost=3455606     Cardinality=3615949     Bytes=636407024          IO cost=3455606     Optimizer=CHOOSE          Timestamp=19.3.2007 ã. 11:00:08
    WINDOW SORT               Cost=3455606     Cardinality=3615949     Bytes=636407024          IO cost=3455606               Timestamp=19.3.2007 ã. 11:00:08
    FILTER                                                  Timestamp=19.3.2007 ã. 11:00:08
    HASH JOIN OUTER                                                  Timestamp=19.3.2007 ã. 11:00:08
    HASH JOIN OUTER               Cost=6610     Cardinality=20963     Bytes=2683264          IO cost=6610               Timestamp=19.3.2007 ã. 11:00:08
    HASH JOIN               Cost=6572     Cardinality=20963     Bytes=2096300          IO cost=6572               Timestamp=19.3.2007 ã. 11:00:08
    PARTITION RANGE SINGLE                                                  Timestamp=19.3.2007 ã. 11:00:08
    TABLE ACCESS FULL     Object owner=RS     Object name=LOANS     Cost=369     Cardinality=24551     Bytes=1104795          IO cost=369     Optimizer=ANALYZED          Timestamp=19.3.2007 ã. 11:00:08
    TABLE ACCESS FULL     Object owner=RS     Object name=LOAN_PLANS     Cost=5629     Cardinality=826902     Bytes=45479610          IO cost=5629     Optimizer=ANALYZED          Timestamp=19.3.2007 ã. 11:00:08
    TABLE ACCESS FULL     Object owner=RS     Object name=EXCH_RATES     Cost=2     Cardinality=1     Bytes=28          IO cost=2     Optimizer=ANALYZED          Timestamp=19.3.2007 ã. 11:00:08
    VIEW     Object owner=MDR          Cost=3203514     Cardinality=167045285     Bytes=8018173680                         Timestamp=19.3.2007 ã. 11:00:08
    WINDOW SORT               Cost=3203514     Cardinality=167045285     Bytes=13530668085          IO cost=3203514               Timestamp=19.3.2007 ã. 11:00:08
    HASH JOIN               Cost=6667     Cardinality=167045285     Bytes=13530668085          IO cost=6667               Timestamp=19.3.2007 ã. 11:00:08
    PARTITION RANGE SINGLE                                                  Timestamp=19.3.2007 ã. 11:00:08
    TABLE ACCESS FULL     Object owner=RS     Object name=LOANS     Cost=369     Cardinality=48079     Bytes=2067397          IO cost=369     Optimizer=ANALYZED          Timestamp=19.3.2007 ã. 11:00:08
    TABLE ACCESS FULL     Object owner=RS     Object name=LOAN_PLANS     Cost=5629     Cardinality=826902     Bytes=31422276          IO cost=5629     Optimizer=ANALYZED          Timestamp=19.3.2007 ã. 11:00:08
    So I have 3 questions that I'm fighting with since last week:
    1) Why the windowing clause of the analytic function requires so many resources since I have index on the "partition by" and "order by" clauses? Is there any way to optimize it?
    2) Is it possible for the query to fill all the 30GB of the temp segment? The table that the query selects from has 4 million records.
    3) What can I do to run successfully my query?
    Thanks.

    FYI, here is the query:
    INSERT INTO LoanPlans ( LoanRefNum, NumFlow, DateFlow, AmtFlowPrinc, AmtFlowInt)
    SELECT t1.event || t1.branch || t1.amendm Field1,
    Row_Number() over
    (partition by t1.branch,t1.event,t1.amendm
    order by t1.inst_nbr) Field2,
    t1.mat_date Field3, t1.inst_principal*t3.ind_rate Field4,
    t1."INT"*t3.ind_rate Field5
    FROM RS.LOAN_PLANS t1 INNER JOIN
    RS.LOANS t2 ON (t1.event=t2.event AND
    t1.branch=t2.branch AND t1.amendm=t2.amendm AND
    t1.DATE_KEY = t2.DATE_KEY) LEFT JOIN
    ( SELECT t2.branch branch, t2.event event, t2.amendm amendm,
    SUM(t1.inst_principal) over
    (partition by t1.branch, t1.event, t1.amendm
    order by t1.inst_nbr) sum_inst,
    t2.inst_nbr inst_nbr, t2.releas - t2.capital_payd inst_rest
    FROM RS.LOANS t2 INNER JOIN
    RS.LOAN_PLANS t1 ON (t2.branch = t1.branch AND
    t2.event = t2.event AND t2.amendm = t1.amendm AND
    t2.DATE_KEY = t1.DATE_KEY)
    ) q ON (t1.branch = q.branch AND t1.event = q.event AND
    t1.amendm = q.amendm) LEFT JOIN
    RS.EXCH_RATES t3 ON (t1.currency = t3.currency AND
    t1.DATE_KEY = t3.DATE_KEY AND t1.DATE_KEY = t3.acc_date)

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

    Hi Everybody;
    My coleague who is an bw consultant facing given below problem in BW production server.
    Error reading the data of InfoProvider ZN_IVLTD
    Error when generating the sql statement.
    ORA-01652: unable to extend temp segment by 128 in tablespace PSAPTEMP
    I checked table space PSAPTEMP as well but its showing o% used.
    Kindly help how can i resolve this problem.
    Regards
    Santosh

    Hi Santosh,
    There is also this thread going on, check if anything will be useful for you.
    Two SAP Instances (DEV & QAS) on singe windows host.
    One problem that I have noticed on UNIX systems for PSAPTEMP, refer to the this note if your OS is UNIX.
    548221 - Temporary Files are created as sparse files
    Regards,
    Nilesh

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

    Hi,
    I am getting error ORA-01652: unable to extend temp segment by 64 in tablespace <Tablespace_Name>. I have checked the temp tablespace and the space of temp table space is sufficiently free.
    Can any one pls suggest on this.
    Thanks,

    Hi;
    Please see below note which could be helpful for your issue:
    TROUBLESHOOTING GUIDE (TSG) - UNABLE TO EXTEND Errors [ID 1025288.6]
    Regard
    Helios

  • ORA-01652: unable to extend lob segment . by in  tablespace .

    Hello.
    We have 2 application servers 10.1.2.2. Each have its own infrastrusture.
    We run report from form. On one AS report works fine.
    On the second AS we get error:
    ORA-01652: unable to extend lob segment . by in tablespace .
    Exactly the same message with dots.
    What do we need to extend? Tablespace of second AS infrastructure? But which tablespace?
    Thanks.

    Maybe the problem is in this procedure (procedure loads data from file system into database):
    create or replace PROCEDURE load_document
    (P_ID IN document.ID%TYPE
    ,P_doc_name IN document.name%TYPE
    IS
         source BFILE := BFILENAME('source_map', p_doc_name);
         where_to BLOB;
    BEGIN
         SELECT file INTO source
         FROM document
         WHERE id = p_id
         FOR UPDATE;
         DBMS_LOB.OPEN(source, DBMS_LOB.LOB_READONLY);
         DBMS_LOB.OPEN(where_to, DBMS_LOB.LOB_READWRITE);
         DBMS_LOB.LOADFROMFILE(where_to, source, dbms_lob.getlength(source));
         DBMS_LOB.CLOSE(where_to);
         DBMS_LOB.CLOSE(source);
         COMMIT;
    END;
    If we remove this procedure from form, we don't get any error from both application servers.
    Why does this code works with one AS and not with the second one?
    Thanks.

  • Check and update optimizer statistics failed

    Hellow Friends,
    After running job Check and update optimizer statistics each and every time from db13 in my BI production server it got failed please
    view the logs
    BR0301E SQL error -20000 at location stats_tab_collect-20, SQL statement:                                                                    
    'BEGIN DBMS_STATS.GATHER_TABLE_STATS (OWNNAME => '"SAPSR3"', TABNAME => '"/BIC/B0000228000"', ESTIMATE_PERCENT => NULL, METHOD_OPT => 'FOR ALL
    ORA-20000: index "SAPSR3"."/BIC/B0000228000KE"  or partition of such index is in unusable state                                              
    ORA-06512: at "SYS.DBMS_STATS", line 13159                                                                               
    ORA-06512: at "SYS.DBMS_STATS", line 13179                                                                               
    ORA-06512: at line 1                                                                               
    BR0886E Checking/collecting statistics failed for table SAPSR3./BIC/B0000228000                                                              
    BR0280I BRCONNECT time stamp: 2009-05-19 18.17.19                                                                               
    BR0883I Table selected to collect statistics after check: SAPSR3./BIC/B0000229000 (161130/1480:0:0)                                          
    BR0280I BRCONNECT time stamp: 2009-05-19 18.17.19                                                                               
    BR0881I Collecting statistics for table SAPSR3./BIC/B0000229000 with method/sample E/P10 ...                                                 
    BR0280I BRCONNECT time stamp: 2009-05-19 18.17.21                                                                               
    BR0301E SQL error -20000 at location stats_tab_collect-20, SQL statement:                                                                    
    'BEGIN DBMS_STATS.GATHER_TABLE_STATS (OWNNAME => '"SAPSR3"', TABNAME => '"/BIC/B0000229000"', ESTIMATE_PERCENT => 10, METHOD_OPT => 'FOR ALL C
    ORA-20000: index "SAPSR3"."/BIC/B0000229000KE"  or partition of such index is in unusable state                                              
    ORA-06512: at "SYS.DBMS_STATS", line 13159                                                                               
    ORA-06512: at "SYS.DBMS_STATS", line 13179                                                                               
    ORA-06512: at line 1                                                                               
    BR0886E Checking/collecting statistics failed for table SAPSR3./BIC/B0000229000                                                              
    BR0280I BRCONNECT time stamp: 2009-05-19 18.17.21                                                                               
    BR0883I Table selected to collect statistics after check: SAPSR3./BIC/B0000230000 (0/13545:0:0)                                              
    BR0280I BRCONNECT time stamp: 2009-05-19 18.17.21                                                                               
    BR0881I Collecting statistics for table SAPSR3./BIC/B0000230000 with method/sample E/P30 ...                                                 
    BR0280I BRCONNECT time stamp: 2009-05-19 18.17.21                                                                               
    BR0301E SQL error -20000 at location stats_tab_collect-20, SQL statement:                                                                    
    'BEGIN DBMS_STATS.GATHER_TABLE_STATS (OWNNAME => '"SAPSR3"', TABNAME => '"/BIC/B0000230000"', ESTIMATE_PERCENT => 30, METHOD_OPT => 'FOR ALL C
    ORA-20000: index "SAPSR3"."/BIC/B0000230000KE"  or partition of such index is in unusable state                                              
    ORA-06512: at "SYS.DBMS_STATS", line 13159                                                                               
    ORA-06512: at "SYS.DBMS_STATS", line 13179                                                                               
    ORA-06512: at line 1                                                                               
    BR0886E Checking/collecting statistics failed for table SAPSR3./BIC/B0000230000                                                              
    Please help me to resolve the issue.

    some of your PSA tables are inconsistent - ex: /BIC/B0000228000 - check PSA partitioning in RSRV to correct the same or delete data from the same using SE14 and try running the same.

  • ORA-01652 unable to extend temp segment in 11gR2 with ASM and 2 node RAC

    Hi ,
    I have a 11.2.0.1 system with 2 node RAC and ASM . We are hitting ORA-01652 very frequently
    and I can see space is available in TEMP .
    CREATE TEMPORARY TABLESPACE "TEMP" TEMPFILE
    SIZE 21474836480,
    SIZE 137437904896
    AUTOEXTEND ON NEXT 655360 MAXSIZE 131071M ( Will the next size ignored as the extent size is 1MB ?)
    EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1048576
    And during the failure
    SELECT tablespace_name,
    total_blocks,
    used_blocks,
    free_blocks,
    total_blocks*32768/1024/1024 as total_MB,
    used_blocks*32768/1024/1024 as used_MB,
    free_blocks*32768/1024/1024 as free_MB
    FROM gv$sort_segment;
    TABLESPACE_NAME TOTAL_BLOCKS USED_BLOCKS FREE_BLOCKS TOTAL_MB USED_MB FREE_MB
    TEMP 4849568 2385728 2463840 151549 74554 76995
    TEMP 0 0 0 0 0 0
    Also when I checked from v$sort_usage I see only two session consuming space
    SQL> SELECT b.tablespace tablespace,
    2 -- b.segfile#,
    3 -- b.segblk#,
    4 b.blocks,
    5 b.blocks * (SELECT value FROM v$parameter WHERE name = 'db_block_size')/1024/1024 bytes,
    6 a.sid,
    7 a.username username,
    8 a.osuser osuser,
    9 a.inst_id,a.sid,a.serial#,a.module
    10 FROM gv$session a, gv$sort_usage b
    11 WHERE a.saddr = b.session_addr and
    12 b.blocks != 16 and
    13 a.inst_id = b.inst_id
    14 ORDER BY b.tablespace, b.blocks, bytes desc;
    BLOCKS BYTES SID USERNAME OSUSER INST_ID SID SERIAL# MODULE
    1,192,864 37277 381 CN obiqb 2 381 860 nqsserver@icmqapp01cdp (TNS V1
    1,192,864 37277 3952 CN obiqb 2 3952 1374 nqsserver@icmqapp01cdp (TNS V1
    2,385,728 74554 (mb)
    Wat is causing the 1652 ?

    877394 wrote:
    Thanks Srini,
    But I did try all that notes with no luck .
    I have a temporary tablespace with 150gb (130+20) datafiles .
    TABLESPACE_NAME FILE_NAME (BYTES/1024/1024)
    TEMP +DATA_01/tempfile/temp.314.743964            131071
    TEMP +DATA_01/tempfile/temp.312.757303             20480
    and the DDL is
    CREATE TEMPORARY TABLESPACE "TEMP" TEMPFILE
    SIZE 21474836480,
    SIZE 137437904896
    AUTOEXTEND ON NEXT 655360 MAXSIZE 131071M
    EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1048576
    And on querying v$sort_usage
    SQL> SELECT b.tablespace tablespace,
    2 -- b.segfile#,
    3 -- b.segblk#,
    4 b.blocks,
    5 b.blocks * (SELECT value FROM v$parameter WHERE name = 'db_block_size')/1024/1024 bytes,
    6 a.sid,
    7 a.username username,
    8 a.osuser osuser,
    9 a.inst_id,a.sid,a.serial#,a.module
    10 FROM gv$session a, gv$sort_usage b
    11 WHERE a.saddr = b.session_addr and
    12 b.blocks != 16 and
    13 a.inst_id = b.inst_id
    14 ORDER BY b.tablespace, b.blocks, bytes desc;
    TABLESPACE BLOCKS BYTES SID OSUSER INST_ID SID SERIAL# MODULE
    TEMP 63,328 1,979 3952 CN 2 3952 1374
    TEMP 84,384 2,637 381 CN 2 381 860
    TEMP 433,184 13,537 381 CN 2 381 860
    TEMP 1,117,728 34,929 3952 CN 2 3952 1374
    sum 1,698,624 53,082 (mb)
    So the space utilization was less than 150gb and on querying v$sort_Segment
    SQL> SELECT tablespace_name,
    total_blocks,
    used_blocks,
    free_blocks,
    total_blocks*32768/1024/1024 as total_MB,
    used_blocks*32768/1024/1024 as used_MB,
    free_blocks*32768/1024/1024 as free_MB
    FROM gv$sort_segment;
    TABLESPACE_NAME TOTAL_BLOCKS USED_BLOCKS FREE_BLOCKS TOTAL_MB USED_MB FREE_MB inst
    TEMP 4849568 2311104 2538464 151549 72222 79327 2
    TEMP 0 0 0 0 0 0 1
    why for inst 1 it is showing 0 (which means no sort is happening in instance 1)
    But still we got the error
    ORA-1652: unable to extend temp segment by 32 in tablespace TEMP
    01652, 00000, "unable to extend temp segment by %s in tablespace %s"
    // *Cause:  Failed to allocate an extent of the required number of blocks for
    //          a temporary segment in the tablespace indicated.
    // *Action: Use ALTER TABLESPACE ADD DATAFILE statement to add one or more
    //          files to the tablespace indicated.

  • Error: ORA-01654: unable to extend index APPLSYS.SYS_IOT_TOP_34179 by 16 in

    Hi,
    I am using Oracle API (HzLocationV2Pub.LocationRec) to update record and getting the following error message in JDeveloper log and couldn't able to update.
    x_return_status : U
    x_msg_data : Unexpected SQL error encountered during synchronization:
    Procedure: sync_party_site
    Error: ORA-01654: unable to extend index APPLSYS.SYS_IOT_TOP_34179 by 16 in tablespace APPS_TS_QUEUES
    Please contact the system administrator.
    x_msg_count : 1
    What is the reason behind this error?
    How to resolve this?
    Thanks & Regards,
    Sagarika

    Hi,
    You need to add more space to your datafile/tablespace, or extend the index.
    SQL> alter index APPLSYS.SYS_IOT_TOP_34179 storage (maxextents unlimited);
    SQL> ALTER TABLESPACE <tablespace name> ADD DATAFILE '<full path and file name>' SIZE <integer> <K|M>; Note: 1025288.6 - How to Diagnose and Resolve UNABLE TO EXTEND Errors
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=1025288.6
    Note: 19049.1 - OERR: ORA 1654 unable to extend index by for tablespace
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=19049.1
    Note: 762273.1 - ORA-1654: unable to extend index
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=762273.1
    Regards,
    Hussein

  • 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-01652: unable to extend temp segment by 1280 in tablespace TEMP

    We have a lot of version 8.5 crystal report templates, now, as required, we want to use JRC (pure java) to export those templates to PDF / RTF etc.
    We have done a lot, for the most of templates, works fine, but there are some reports, once the data is large, an error coming :ORA-01652: unable to extend temp segment by 1280 in tablespace TEMP
    for this problem:
    1.  I have read the migration guide first :http://support.businessobjects.com/communityCS/TechnicalPapers/cr_xi_designer_migration.pdf
    2. I have tested the templates with the same parameters in designer, they are just fine ( and obviously, the old templates can work with COM components in wintel platform , we used VB )
    3. Because 2 works fine, I tried to extend our oracle temporary tablespace, but everytime I extend, I can see it will always be fully occupied by the JRC export function.
    4. The problem is occured in the  repSrc.export(expOpt, reqCont) function
    I am now trying to find out the reasons:
    1. checking the parameters real value in the report
    2. enable log4j for JRC to see the real SQL statement
    This is really annoying problem, I would appreciate if anyone could give me help.

    I think this is one might have some relationship with my problem
    http://diamond.businessobjects.com/node/477
    I found in version 8.5, the created SQL Statement is simple, all conditions come under Where clause, but the new crystal report XI convert this to "join" types.
    But JRC engine will lost some very important join condition to make the result really large, so, my oracle error comes out.
    I am thinking about to write command object as a workaround for this issue, woundn't JRC engine support the simple SQL Statement?
    I found the release note of CR4E says some features are "Supported" instead of "Full Support", where can I find the detail list of these un-supported feature list?

  • 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

  • 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

Maybe you are looking for