Add a Unique constraint - unable to extend temp segment

I get the error message ' ORA-01652: unable to extend temp by 1024 segment in tablespace...» ». I'm a developer, and our DBA is on vacation. I try to understand what is happening, so I followed V$ SORT_SEGMENT, while the constraint is created. Here's what this view looks like immediately before and after the exception is thrown:
10:43:07 < ... > select * from v$sort_segment;

TABLESPACE_NAME                 SEGMENT_FILE SEGMENT_BLOCK EXTENT_SIZE CURRENT_USERS TOTAL_EXTENTS TOTAL_BLOCKS USED_EXTENTS USED_BLOCKS FREE_EXTENTS FREE_BLOCKS ADDED_EXTENTS EXTENT_HITS FREED_EXTENTS
------------------------------- ------------ ------------- ----------- ------------- ------------- ------------ ------------ ----------- ------------ ----------- ------------- ----------- -------------
FREE_REQUESTS   MAX_SIZE MAX_BLOCKS MAX_USED_SIZE MAX_USED_BLOCKS MAX_SORT_SIZE MAX_SORT_BLOCKS RELATIVE_FNO
------------- ---------- ---------- ------------- --------------- ------------- --------------- ------------
TEMP                                       0             0         128             1           460     58880     460       58880            0           0           460         505          2809
            1       2809     359552           460           58880           460           58880            0


Elapsed: 00:00:00.04
10:43:13 < ... > select * from v$sort_segment;

TABLESPACE_NAME                 SEGMENT_FILE SEGMENT_BLOCK EXTENT_SIZE CURRENT_USERS TOTAL_EXTENTS TOTAL_BLOCKS USED_EXTENTS USED_BLOCKS FREE_EXTENTS FREE_BLOCKS ADDED_EXTENTS EXTENT_HITS FREED_EXTENTS
------------------------------- ------------ ------------- ----------- ------------- ------------- ------------ ------------ ----------- ------------ ----------- ------------- ----------- -------------
FREE_REQUESTS   MAX_SIZE MAX_BLOCKS MAX_USED_SIZE MAX_USED_BLOCKS MAX_SORT_SIZE MAX_SORT_BLOCKS RELATIVE_FNO
------------- ---------- ---------- ------------- --------------- ------------- --------------- ------------
TEMP                                       0             0         128             0           460     58880       0           0          460       58880           460         505          2809
            1       2809     359552           460           58880           460           58880            0


Elapsed: 00:00:00.02
My DBA had previously asked me to issue this command to try to avoid this error:
alter database tempfile '...' resize 12g;
I'm doing this, but I still show only 460 free segments. Can someone point me to some documentation on how to do the free Extents be greater than 460?

Here's my customer info:
SQL*Plus: Release 11.2.0.3.0 Production on Tue Nov 6 10:40:39 2012

Copyright (c) 1982, 2011, Oracle.  All rights reserved.
Here's my server info:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

As you seem to be able to add/increase of temporary files, you may also be able to see the dba_ views *. As a first shot, try:

select sum(bytes) from dba_free_space
where tablespace_name = 

If there seems to be enough space (no idea what it would be since I do not know how big are the valuables) then try something like:

select file_id, block_id, bytes from dba_free_space
where tablespace_name = 
order by bytes desc

If you have large amounts of space free contiginous (i.e. the first rows have great value to the bytes column) ther may be something else.

If the two queries show remote small values for the amount of free space, you will need to add another data file to the storage space, or increase the size of one of the existing data file.

To see the data files in the use of tablespace:

select file_name, bytes from dba_data_files
where tablespace_name = 

You can increase the size of a data file using something similar to the alter database command that you have for the tempfiles as:

alter database datafile  resize some bigger number

Just make sure that the file system has enough free space for the new size.

John

Tags: Database

Similar Questions

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

    Hello

    I get the error ORA-01652: unable to extend temp segment of 64 in tablespace < nom_tablespace >. I checked the temp tablespace and temporary table space space is sufficiently free.

    A pls you suggest on this.


    Thank you

    Salvation;

    Please see below note that might be useful for your question:

    TROUBLESHOOTING GUIDE (TSG) - IMPOSSIBLE to EXTEND errors [ID 1025288.6]

    Respect of
    HELIOS

  • ORA-1652: unable to extend temp segment

    Hello
    10g R2 on Windows 2003, in the alertlog I have:
    ORA-1652: unable to extend temp by 16 segment in tablespace PSTEMP

    1. How can I see if autoextend on?
    2. How can I increase it by a query in SQlplus?

    Thank you.

    You can check autoextend at the bottom of the query.

    Select file_name bytes/1024/1024 user_bytes/1024/1024, maxbytes/1024/1024, CanGrow in dba_temp_files;

    ALTER TABLESPACE temp ADD TEMPFILE ' / u02/oradata/TESTDB/temp01.dbf' SIZE 512 m 2 AUTOEXTEND ON NEXT 250 m MAXSIZE UNLIMITED;

    Published by: CKPT on October 28, 2010 20:00

    Published by: CKPT on October 28, 2010 20:00

  • ORA-01652: unable to extend temp segment

    Hello


    Chat support told me that I need to connect this question here...


    My cloud trial database service is running out of storage


    ORA-01652: unable to extend segment temp of 128 in tablespace APEX_ #.


    ORA-01653: unable to extend table YZJMXMYGKBNK. 128 in tablespace APEX_91669423895621749 CPC_STATEMENT


    I have 15 tables:


    Tablespace megabytes

    CPC_CONFIG APEX_ # 0.06

    CPC_CONTROL APEX_ # 0.06

    CPC_DEBUG APEX_ # 10.00

    CPC_EXTERNAL APEX_ # 0.81

    CPC_INDEX APEX_ # 0.13

    CPC_INPUTS APEX_ # 0.06

    CPC_STATEMENT APEX_ # 2.00

    CPC_STUDENT APEX_ # 0.06

    CPC_STUDENT_PAY APEX_ # 0.06

    CPC_STUDENT_STATEMENT APEX_ # 0.06

    DEPT APEX_ # 0.06

    EMP APEX_ # 0.06

    PAYPAL_SESSION_MAP APEX_ # 0.06

    PAYPAL_TRANSACTIONS APEX_ # 0.06

    RETURN APEX_ # 0.06


    How can I see what is using my storage?


    Thank you


    Steve


    Thanks Shema informing me run: Purge Recyclebin;

    My database is down to a low as 60 MB used.

  • Unable to extend temp segment with mview 01652

    11.2.0.2.0

    a strange.

    USERA has a select statement that returns in 1 second

    create view v1 select

    Grant select on v1 to UserB

    with USERB I can select * from V1 in < 1 second, all good.

    But when USERB attempts to create a materialized view based on as "select * from usera.v1"I'll ring the tablespace temp 65 gb. "  nothing else in the temp during operation.  someone at - it seen that before?  must be something unique to mviews.   theres are a link db tables in the view.

    The execution plan for the create view materialized is different from that of a table to create.

    See Oracle Support note Create Materialized View or full refresh taking more than ETG or Insert Select (Doc ID 763718.1) to https://support.oracle.com

    Hemant K Collette

  • ORA-1652: unable to extend temp segment of 32 in the TEMP tablespace

    No special work is running. Can you tell how to handle this problem?

    Any way to free up space in tablespace temp?

    Thank you.

    alter tablespace temp retractable Dungeon space 100M;

    have control over this post, very good site for examples, concise what to do and how: http://oracle-base.com/articles/11g/temporary-tablespace-enhancements-11gr1.php

    However, per above, you will need to check what users are doing. If they are unnecessarily large kinds they will blow the temp tablespace, but a tablespace temp used in respect of normal operations is very good.

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

    Dear team,
    While the import of the mistake .dmp file below shows. Please suggest me...


    ORA-39171: job knows a wait can be resumed.
    ORA-01652: unable to extend temp by 1024 segment in tablespace AXPERT
    ORA-39171: job knows a wait can be resumed.
    ORA-01652: unable to extend temp by 1024 segment in tablespace AXPERT

    What is the inability of a temp segment to expand has to do with "database security - general?

    Please lock this thread and open one in the appropriate forum, "General database".

    Thank you.

    When you include all the important, relevant information you have not provided here such as:
    1. version number
    2. what you import and how (IMP, DataPump, something else?)
    3. size and spatial arrangement in the temp tablespace and on autoextend?
    4. available for autoextend temp disk space?
    5. extract from the alert log showing the messages corresponding to the question.

  • ORA-1652 unable to extend temp

    Hello
    I see this error in the alert log:

    ORA-1652: unable to extend temp of 5120 segment in tablespace STATION_INDEX

    I'm a little confused by the fact that he tries to extend TEMP segment, but why he called an index segment. I think it's INDEX seg needed the additional data file, but why name temp then?

    Thank you.

    This isn't a bug, but a feature expected. During the index maintenance, temporary segments are created in the tablespace defined index. Currently your index tablespace cannot meet these requirements.

    Werner

  • Add a unique constraint only if it does not exist

    Community of squeegee Hello,

    I would like to create a unique (at least on two columns) constraint on several tables via a script. Is there anything to be learned from the ALTER TABLE statement only when a constraint on the same column does not already exist? Or I have to query the table USER_CONSTRAINTS first?

    Ikrischer

    Yes, something like this:

    set serveroutput on
    declare
    
      UNIQUE_CONS_EXISTS exception;
      pragma  exception_init(UNIQUE_CONS_EXISTS, -2261);
    begin
    
      for r in (select table_name
                      ,rownum rn
                from all_tables where ....) loop
        begin
          execute immediate 'alter table ' || r.Table_Name || ' add constraint i_' || r.rn || ' unique (col1,col2)';
          when UNIQUE_CONS_EXISTS then
            dbms_output.put_line(sqlerrm);
          end;
    
      end loop;
    
      dbms_output.put_line('Done');
    end;
    /
    

    The only thing to keep in mind is that your constraint names are simply numbered increments and have no significance.

  • ORA-1652: unable to extend temp by 16 segment in tablespace APPS_TS_MEDIA

    I do this sometimes in my system R12.1.3 Linux.

    We run nightly work of "Purge obsolete generic Queue Manager Data".

    At first I thought that maybe it had to do with the correspondents or program name null but based on some reading that is not necessarily a problem.

    I found a good ID 1410946.1 query to show sorted by attachment size IN. header level, but as long as the DBA, I don't have really isn't the application brief

    to find out what they need to keep vs purge.

    The tablespace when I detected this error initially had 3.6 GB free of a tablespace of 15 GB.  Now it's down to < / 3GB.

    The APPLSYS. FND_LOBS segment is about 5 GB but then whence my mistake?

    I do not see where Doc-ID 298698.1 suggest change PCTVERSION from 10% to 0, so I guess that any reason not to?

    You SYS_LOB % objects use more space and this has been discussed many times in the forum before, and that's why we post the link instead of go through the same discussion again

    https://community.Oracle.com/thread/search.jspa?q=SYS_LOB

    Thank you

    Hussein

  • ORA-01652 unable to enxtend temp segment in tablespace error

    Hi friends,
    I get this error when executing a query. The TEMP tablespace size is 8 GB. Please find below the query

    ++++++++++++
    SELECT leg_only.*
    OF leg_only_oc_1aug_15k_itr2 leg_only,.
    [email protected] blng,
    [email protected] her.
    billing_charges_all_aug1 bc,
    [email protected] cust,
    [email protected] cso
    WHERE leg_only.cust_code_leg = SUBSTR (blng.ba_external_id, 4)
    AND bc.cust_code = leg_only.cust_code_leg
    AND blng.ba_customer_no = cust.customer_no
    AND cust.entity_id = sa.agreement_no
    AND cust.entity_type = s"
    AND bc.BE = blng.business_entity
    AND sa.soc = bc.offer_id
    AND bc.charge_type = 'OC '.
    AND cso.soc_cd = sa.soc
    AND cso.revenue_code = 'o'
    AND not exists (select 1 Cor [email protected] where oc.service_receiver_id = sa.agreement_no and oc.customer_key = cust.customer_key);

    ++++++++++++
    My questions:
    1. How can I change the above request for a smooth w/o TEMP space error?
    2. in the future how to correct estimate of the use of TEMP tablespace for any particular query?


    See you soon,.
    Malika

    PL see if he can help to MOS Doc 793380.1 (troubleshooting error ORA-1652)

    HTH
    Srini

  • Unusual ORA-01652: unable to extend segment temp of 128 in tablespace TEMP_

    Hello gurus,

    I apologize with the same pot in different category

    I get a strange error, after current request for 15 minutes.
    ORA-01652: unable to extend temp segment by 128 in tablespace TEMP_TS
    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.
    select * from v$version;
    
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    "CORE     11.2.0.3.0     Production"
    TNS for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 – Production
    After the series of suggestions online I increased 10Gig TEMP_TS since I got the same error a few times more.

    I have other databases with the same data in which I have less temporary space (5 Gig), but it not start error and results less than 1 sec.

    I bounce the database, see if it makes a difference, but it did not.

    My question is

    * 1. What are the other settings I need to account for this mistake? *
    * 2. Why, even after the increase in temp space (almost double) has not solved the error? *

    Good article to verify what it takes when temp tablespace runs out of the question:

    http://www.dbspecialists.com/files/presentations/temp_space.html

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

    Hello friends,

    I get this alert in the alert log every time that the statistics of the work... Here is the complete list of the alerts log
    78939:ORA-12012: error on auto execute of job 2
    78940:ORA-01652: unable to extend temp segment by 128 in tablespace TEMP
    78941:ORA-06512: at "SYS.DBMS_STATS", line 13336
    78942:ORA-06512: at "SYS.DBMS_STATS", line 13682
    78943:ORA-06512: at "SYS.DBMS_STATS", line 13760
    78944:ORA-06512: at "SYS.DBMS_STATS", line 13719
    78945:ORA-06512: at line 1
    Please advise... How to fix this error

    Please advise... How to fix this error

    ALTER TABLESPACE TEMP ADD TEMPFILE...

    View the name of the operating system (OS) & version for DB Server System.
    View the results of
    SELECT * from version $ v

    Published by: sb92075 on December 25, 2009 19:40

  • ORA-1652: unable to extend

    Hello
    11g R2 I have several times the following error in alertlog:
     
    2012-08-10 12:16:45.061000 +02:00 
    ORA-1652: unable to extend temp segment by 16 in tablespace                 PSTEMP 
    How can I find the user or the query that causes this?
    Thank you.

    May be a little late:

    Yes, but maybe the motion will come back again and particularly statement helps you to find the request for enforcement with high temp usage.

  • ORA-1652: unable to extend segment temp of 128 in tablespace STAGING_TEST

    Hello

    Oracle: 11.2.0.3
    OS: Linux 5.8


    ORA-1652: unable to extend segment temp of 128 in tablespace STAGING_TEST
    ORA-1652: unable to extend temp by 8192 segment in tablespace STAGING_TEST
    ORA-12012: error on auto work "STAGING_TEST". "" PDM_MAIL_SCHEDULER ".
    ORA-06550: line 1, column 786:


    We get the error below, we have a STAGING_TEST tablespace, is only 75% full & TEMP is also almost free and "auto is on ' on all the data files.
    why we get this error when he has space (TEMP & STAGING_TEST)...

    one more doubt.

    1. where we add STAGING_TEST or TEMP datafile?
    2. What is this msg exactly means... the space problems are in TEMP or STAGING_TEST?
    3. even if auto is on and space is available in the disk, why we get this error...


    Pls suggest...

    Thank you
    @ble

    1. where we add STAGING_TEST or TEMP datafile?

    This problem has nothing to do with the TEMP tablespace. You must add the STAGING_TEST space

    2. What is this msg exactly means... the space problems are in TEMP or STAGING_TEST?

    The problem means that oracle in some cases trying to do this treatment in the temporary segments (not tablespace temp) and change the permananet segments. an example is the online index rebuild.

    3. even if auto is on and space is available in the disk, why we get this error...

    You try to create any big index or tables? greater than 10 G?

Maybe you are looking for

  • migrate from first pro

    Hi all I am to change a doc that is based on 7 teams in 7 countries for a draft reform of the media edition.   I am in charge of collecting their segments (adding of more texts/music/voice) to make a solidarity program.  I work in FCPX, but despite m

  • What is photo Version 1.0.1

    Some time before, I downloaded inadvertently photos Version 1.0.1 (215.65.0), thinking it was an update to iPhoto. I searched the web and this site and cannot find information on what it actually is used for! It seems redundant and I don't see any wa

  • Satellite P200 randomly turns off by itself

    Do not know what is happening, every now and then it shuts it self without reason. I used recovery disks several times and it keeps doing. Very frustrating. Any help would be appreciated!

  • Can I synchronize Apple Watch with iPad or blackberry

    CCan I have sync Apple Watch with iPad or blackberry

  • I can't find the drivers of windows 8 for g6-1322tx

    HelloI'm on pc g6 1322tx pavilion laptop and wanted to update my windows to windows 8 (64-bit) but I can't find the drivers for my laptop on hp's website, I can't find this particular product driversPlease help, thank you.