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.

Similar Messages

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

    Hi All,
    Today in we have faced the below issue in our production database
    ORA-1652: unable to extend temp segment by 128 in tablespace                 TEMP
    ORA-1652: unable to extend temp segment by 128 in tablespace                 TEMP
    when we checked we are having 99% of free space in temp tablespace,we are not able to understand why we got this error.
    earlier also we got the same issue adding datafile to the tablespace solved the issue. wanted to know if free space exsists why we getting this error.
    Thanks....

    Hi,
    Please check Oracle support id : TROUBLESHOOTING GUIDE (TSG) : ORA-1652: unable to extend temp segment (Doc ID 1267351.1)
    and OTN Form :
    https://forums.oracle.com/thread/457771?start=0&tstart=0
    https://forums.oracle.com/thread/703095?start=0&tstart=0
    Thank you

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

  • Need help on "unable to extend temp segment by 128 in tablespace TEMP..

    Dear All,
    I recently ported my code from Vs 2003 running on Windows 2003 Server to VS 2010 running on Windows 2008 Server 64bit.
    The DB query that we trigger from the code has not been changed but forming the query is changed.Like in very high level initally I was getting data at execution level so I use sprintf to form the query along with required params and then use SQLExecute. The application runs fine for few hrs after that I get the below error.
    6/23 15:40:11 (4396 0214): ExecuteDirectly::Failed Query is [insert into Test  (bbid, keyOrder, keyLength, keyValue) values (?, ?, ?, ?)]
    06/23 15:40:11 (4396 0214): Encountered ODBC error -1: S1000, 1652, [Oracle][ODBC][Ora]ORA-01652: unable to extend temp segment by 128 in tablespace TEMP
    I am using Oracle 11g client on Windows 2008 Server R2. Surprisingly when we get this temp space issue in the DB, that time when I run the same query through application from a 32bit it is able to execute successfully same doesn't happen with 64bit machine.
    Any suggestion to resolve the above error ?Am I doing a memory leak of something which is causing the above issue.
    Thanks in advance.
    -R

    I was trying to monitor as which inserting is causing this issue.It looks to be the insertion of blob data is causing the issue.When I disable all the insertions of Blob data the temp space issue doesn't come.
    I am seeing some trailing characters in the coloumn when we are inserting Blob. I am doing SQLBindParameter with SQL_C_BINARY and SQL_LONGVARBINARY as InputOutputType and ValueType respectively.Do you see any problem in this.
    Thanks,
    -R

  • Unable to extend temp segment by 128 in tablespace TEMP

    Hi all,
    I am using apps 11.5.10.2 and i think this is a database issue
    ERROR at line 1:
    ORA-01652: unable to extend temp segment by 128 in tablespace TEMP
    Do i have to increase the tablespace, if so how to do it. I don't even know the EM Pass
    Regards
    Jagan

    what is the size of your temp tablespace?
    Have another try, if the problem persists, increase the temp datafile size.
    alter database tempfile <temp file name> resize <integer> M;
    You can also add a new datafile.
    ALTER TABLESPACE name ADD TEMPFILE 'filename.dbf' SIZE 10M;
    You can always investigate and try to avoid too much sort by checking the SQL.
    Jaffar

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

    HI,
    i am getting an error in alert log file.....
    Thread 1 advanced to log sequence 1758
      Current log# 2 seq# 1758 mem# 0: /dev/vx/rdsk/racdg/orcl_raw_log12
    Mon Sep  8 12:34:16 2008
    ARC1: Evaluating archive   log 1 thread 1 sequence 1757
    ARC1: Beginning to archive log 1 thread 1 sequence 1757
    Creating archive destination LOG_ARCHIVE_DEST_1: '/arch/log/1_1757.dbf'
    ARC1: Completed archiving  log 1 thread 1 sequence 1757
    Mon Sep  8 13:04:26 2008
    Completed checkpoint up to RBA [0x6de.2.10], SCN: 0x0000.6c1f757f
    Mon Sep  8 13:49:16 2008
    ORA-1652: unable to extend temp segment by 128 in tablespace                 TEMPI don';t want to add datafile
    SQL> select bytes,maxbytes,increment_by from dba_temp_files;
         BYTES   MAXBYTES INCREMENT_BY
    6134169600          0            0
    SQL> select TABLESPACE_NAME, BYTES_USED, BYTES_FREE from V$TEMP_SPACE_HEADER;
    TABLESPACE_NAME                BYTES_USED BYTES_FREE
    TEMP                           6037700608   96468992i have also referred metalink note: 19047.1
    Is there any way to avoid this problem without adding any datafile........

    how to find out which session is using temp tablespace
    SQL> select * from v$sort_usage;
    USERNAME                       USER                           SESSION_ADDR
    SESSION_NUM SQLADDR             SQLHASH TABLESPACE
    CONTENTS  SEGTYPE     SEGFILE#    SEGBLK#    EXTENTS     BLOCKS   SEGRFNO#
    DATA3                        DATA3                        000000044D84F558
          25860 00                        0 TEMP
    TEMPORARY DATA             201     183561          1        128          1pls correct me if the above query is worng to find out the no. of session s using temp tablespace
    i think we have already allocated good amt of space to pga_aggregate_target
    SQL> show parameter pga
    NAME                                 TYPE        VALUE
    pga_aggregate_target                 big integer 524288000
    SQL>Edited by: user00726 on Sep 8, 2008 2:29 AM

  • 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

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

    Dear All,
    While create index command
    "create index idx_CALLED_NO on dbs(CALLED_NO) nologging"
    an error occure
    ORA-01652: unable to extend temp segment by 8192 in tablespace CDR_TAB
    how to retify it.what is the command to add datafile or tablespace......
    Using oracle 9i...
    Thanks in advance

    create tablespace or add index, that you can find out at http://tahiti.oracle.com
    You should check space on CDR_TAB.
    I think you can create new tablespace
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_74a.htm#SQLRF01403
    Create tablespace CDR_IND datafile 'xxx' ...After that create index
    create index idx_CALLED_NO on dbs(CALLED_NO) nologging tablespace CDR_IND ;Good Luck;)

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

  • 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 256 in tablespace TEMP

    ORA-01652: unable to extend temp segment by 256 in tablespace HDM_DBUSER_TEMP
    HI GURUS PLEASE HELP ME,
    I Have 9i database on solaris version 9,
    i am repeatedly getting the following error in the alert.log file.
    Failed write to clobORA-01652: unable to extend temp segment by 256 in tablespace HDM_DBUSER_TEMP
    using the meta link Doc ID:     280578.1, i have increased the temp TS, but still getting the same alert message in alert.log file.
    In metalink it is given second solution,
    If there is severe temp segment space contention across instances, a
    slowdown can occur. The following are potential workarounds:
    - Increase size of the temp tablespace
    - Do not use the DEFAULT temp tablespace feature in RAC.
    - Increase sort_area_size and/or pga_aggregate_target "
    I have increased the size of the temp TS, but the error is poping up still in alert.log.
    I don't know how to assign DEFAULT temp tablespace feature in RAC????
    SQL> select inst_id, tablespace_name, total_blocks, used_blocks, free_blocks
    from gv$sort_segment; 2 ^R
    from gv$sort_segment;
    INST_ID TABLESPACE_NAME TOTAL_BLOCKS USED_BLOCKS FREE_BLOCKS
    1 TEMP 2304 0 2304
    1 HDM_DBUSER_TEMP 519424 519424 0
    PLEASE Help !!!
    Thanks in advance

    Hello,
    Add additional datafile to followign tablespace, also post out of the followign command
    SELECT dt.tablespace_name,
           file_name,
           bytes,
           extent_management,
           segment_space_management
    FROM dba_tablespaces dt, dba_data_files ddf
    WHERE dt.tablespace_name = ddf.tablespace_name;
    ALTER TABLESPACE hdm_dbuser_temp ADD DATAFILE '/location/...' SIZE 512M
          AUTOEXTEND ON NEXT 256M MAXSIZE 4096M;   -- or unlimited on 8192 MRegards

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

    im just trying to execute a query with an analytic function used and this error occurs : ORA-01652: unable to extend temp segment by 9600 in tablespace TEMP
    select substr(b.eff_dt,1,10) "Effective",b.amt,sum(b.amt) over (order by substr(b.eff_dt,1,10)) "running_sum"
    from b_dl b, b_dl b2
    where b.st_cd = '1'
    and ( b.b_key is null or b.b_key not in(39,40,55,31,32,33,34,35,36,37,38,39,40,55,43,44))
    and b.amt <> 0
    please help

    If you are not a DBA, then get in touch with your Database administrator and show him this problem. Your database is running out of TEMP tablespace because of the sorting needed by this query.
    BTW, How many rows are being processed in this self join query?

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

Maybe you are looking for

  • HP p1102w wireless MAC issue

    I just bought an HP LaserJet Pro p1102w. I have a MacBook Pro running OS X v10.6.8 Snow Leopard. I followed these instructions exactly from HP: HP Instructions (the same instructions as those found in this popular YouTube Video. Everything works fine

  • What happened to the scrubber in Premiere CS6

    One of my favorite tools in the source and program monitors in previous versions was the scrubbing tool. I don't see it in CS6. Any ideas ? TY Gene

  • Not Allowed to use Adobe Muse in Creative Cloud trial

    I previously had a month-to-month Adobe Muse subscription and just started the Creative Cloud Trial. Because i had canceled my month-to-month subscription, the Muse application will not let me open files unless I renew my subscription - even though I

  • Migration from Mysql 5 to Oracle fails- java.lang.OutOfMemoryError

    Hello Folks, I m trying to migrate my DB from mysql 5 to Oracle 10g . I m meeting with some issues. 1) My table data are missing. 2) My foreign key indexing is missed. Any idea why so? This is a portion of Error log: ** Started : Wed Dec 20 13:06:56

  • Email reply not saved

    Has Apple ever advised why the mail app sometimes does not save the reply anywhere. Not locally or on the mail server? I am using Imac intel and Mail 6.2 Mountain Lion. My email provider is BT Yahoo and I am using imap protocol. Message was edited by