Should I increase TEMP tablespace size here ?

Version: 10.2.0.4
Platform : RHEL 5.8
Currently we are running a batch job in a schema. The default temporary tablespace for that schema is TEMP.
But I see that the tablespace is full.
SQL> select file_name, bytes/1024/1024/1024 gb from dba_temp_files where tablespace_name = 'TEMP';
FILE_NAME                                                                 GB
/prd/fdms/oradata_db18/fdmsc1sdb/oradata/ts_temp/temp01.dbf               10
SQL> SELECT     TABLESPACE_NAME, FILE_ID,
        BYTES_USED/1024/1024,
        bytes_free/1024/1024
FROM V$TEMP_SPACE_HEADER where tablespace_name = 'TEMP'  2    3    4  ;
TABLESPACE_NAME                             FILE_ID BYTES_USED/1024/1024 BYTES_FREE/1024/1024
TEMP                                              1                10240          
So, far the application users have not complained and I didn't see any 'unable to extend' error in the alert log yet,  but the above scenario is dangerous. Right? I mean SQL statements with sorting can error out. Right ? Unlike UNDO, with temp tablespace, temp segments cannot be reused. Right ?

Hello,
As said previously, the Sort Segments can be reused, the Views V$SORT_SEGMENT and V$TEMPSEG_USAGE are relevant to monitore the usage of the Temporary Tablespace.
You'll find in the Note below a way to control over time the Temporary Tablespace:
How Can Temporary Segment Usage Be Monitored Over Time? [ID 364417.1]
More over, you may also check for any ORA-01652 in the Alert Log.
But don't worry to much to get a Full Temporary Tablespace, here "Full" doesn't mean "unreusable".
Hope this help.
Best Regards,
Jean-Valentin Lubiez

Similar Messages

  • What should be idea temp tablespace size ?

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

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

  • Maximum Temp tablespace size you've seen

    DB version: 10.2.0.4
    Our DB caters a retail application . Total DB Size of 3TB. Its is a bit of mix of both OLTP and Batch processing environment.
    Our temp tablespace has 1 file and we had set the tempfile as AUTOEXTEND. Somehow its size has reached 25GB now !
    We don't actually need this. Do we?
    For a fairly busy DB of around 3TB size, what is the maximum temp tablespace size you've ever seen?
    What is the maximum temp tablespace size you've ever seen for Big DB like Telecom, Banking?

    The point about temp space is that your requirements are dynamic - the actively used area shrinks and grows.
    Comparing apples with oranges, tempfile sizes on system where I am currently here amount to 50 GB but to be honest that's mainly due to a not insignificant number of pretty poor queries, run concurrently, with multipass operations, etc.
    Kellyn Pedersen had an example of a process using 720GB here:
    http://dbakevlar.com/?p=43
    Whilst 25GB may not be earth shattering, a "large" temp area may perhaps be an indicator that you want to review some of your application code.
    (What is "large"? "unusual" compared to what is "normal" for your system may be a better metric)
    If you're using automatic pga memory management, then there's a limit to what each session can get, it may be that automatic work areas are not suitable for some of your code and some manual sizing is required to prevent operations spilling unnecessarily.
    Also, inaccurate CBO estimates on your queries can lead to inaccurately sized work areas that then spill into temp.
    There was a reminder of this in one of Randolf Geist's articles on hash aggregation:
    http://oracle-randolf.blogspot.com/2011/01/hash-aggregation.html

  • Increasin the temp tablespace

    Hello All,
    I am using Oracle 11g R2 i want to increase the temp tablespace size. can i use the below command? can i increase while the database is open and some queries are running and use the temp table space?
    ALTER DATABASE TEMPFILE '....../datafile/name_datafile.tmp' RESIZE 100M
    Regards,

    Hello,
    I am using Oracle 11g R2 i want to increase the temp tablespace size. can i use the below command? can i increase while the database is open and some queries are running and use the temp table space?Why do you intend to extend the Temporary Tablespace ? Do you have any ORA-01652 error ?
    If not, may be it's not necessary to extend it. Even if it seems to be full Free Extents are reused.
    ALTER DATABASE TEMPFILE '....../datafile/name_datafile.tmp' RESIZE 100MYes you can use this statement, but be aware that the Size specified (here 100 Mo) is the target size not the supplemental size.
    Hope this help.
    Best regards,
    Jean-Valentin

  • Relation between temp tablespace and index creation

    Hi,
    I have my Oracle database (11gR1) on windows 2008 server R1 64 bit..
    This is my development database. i have one table which has more than 2 billion rows , the problem i m facing here is while creating the index on this table i m getting temp segment error , while my temp tablespace size is 32 gb.
    Here my doubt is :
    1.What will happen in temp tablespace when index is created ? Relation between temp and index creation ?
    2. how to create the index on a huge table?
    3. What is the meaning og logging and no logging in INDEX creation .
    4. how can we over come for these kind of problem and manage the temp TS..
    Thanks & Regards,
    Vikash Chauradia

    add another tempfile?
    1.What will happen in temp tablespace when index is created ? Relation between temp and index creation ?
    index creation needs sort. how much depends on the size of the index.
    2. how to create the index on a huge table?
    create an interim (temporary? :)) huge temporary space for the very purpose.
    http://docs.oracle.com/cd/B28359_01/server.111/b28310/indexes003.htm#i1006643
    3. What is the meaning og logging and no logging in INDEX creation .
    nologging means you the creation isnt in the logs so if you need to recover you cant get back to it. when using nologging in a prod env you might do it for performance during a period of heavy dml such as a large index creation and then backup afterwards. common enough.
    4. how can we over come for these kind of problem and manage the temp TS..
    current tempspace size =X
    is X big enough? if yes, cup of tea, if no, make X bigger.
    It doesnt matter what X is.

  • Windows Server batch to resize TEMP tablespace.

    I was wondering if it's possible to use windows server 2003 batch jobs to RESIZE TEMP tablespace.
    Here are some details:
    Windows Server 2003
    Oracle 10gR2
    We do a windows batch job to backup all files on Oracle directory (.ctl, .dbf, etc) to a different server. With autoextend on, the TEMP.dbf gets to be really big. What I am wanting to do is reduce the size of the TEMP.dbf before backing up the files - to reduce the back up time.
    Since alter database tempfile 'c:\oracle\...' RESIZE 10M is a SQL command; is there a way I can resize it through the windows batch job? If so, mind pointing me the way?
    Thanks.

    a) Consider using RMAN for backup
    b) Don't backup temp tablespace
    c) Are Temporary tabesspaces Backed Up

  • Recreate database but with bigger tablespace size

    Hi guys,
    Objective: I need to recreate our prod db but I need to increase my tablespace size to make use of added capacity of our new server.
    Steps to be done: I plan to execute a "CREATE TABLESPACE" script in our prod db and just change the size of my datafiles in the script. I have a full db export of the prod db After executing the "CREATE TABLESPACE" script, I will import the full prod db export into the new db.
    Problem: What will be the end result of the steps above? When I import the file to the new db will my tablespace from the new db inherit the size of the prod db tablespace?
    Kindly Help.
    Thanks and Best Regards

    If you precreate the database and all the tablespaces (as it exists in your current db), and then if you perform a full import, it should be ok. You will be able to preserve the tablespace storage specification as you precreated...and will not inherit that of the current/existing database.
    HTH
    Thanks
    Chandra Pabba

  • Calculate TEMP tablespace

    Hi,
    Please advise, how to calculate TEMP tablespace size in bytes?
    Thanks

    user1170666 wrote:
    Hi,
    Please advise, how to calculate TEMP tablespace size in bytes?
    Thanksquery view below
    SQL> desc dba_temp_files;
    Name                                      Null?    Type
    FILE_NAME                                          VARCHAR2(513)
    FILE_ID                                            NUMBER
    TABLESPACE_NAME                           NOT NULL VARCHAR2(30)
    BYTES                                              NUMBER
    BLOCKS                                             NUMBER
    STATUS                                             VARCHAR2(7)
    RELATIVE_FNO                                       NUMBER
    AUTOEXTENSIBLE                                     VARCHAR2(3)
    MAXBYTES                                           NUMBER
    MAXBLOCKS                                          NUMBER
    INCREMENT_BY                                       NUMBER
    USER_BYTES                                         NUMBER
    USER_BLOCKS                                        NUMBERHandle:     user1170666
    Status Level:     Newbie
    Registered:     Jul 20, 2010
    Total Posts:     39
    Total Questions:     11 (11 unresolved)
    why do you waste time here when you NEVER get any question answered?

  • Temp tablespace - why so big?

    Temp tablespace (size 6gb) is twice the size of my data and index tablespace combined. I am running into space issues and am wondering is it possible to resize this tablespace and/or take some other action to prevent the temp tablespace getting so relatively large?
    Thanks in advance.

    The Temporary Tablespace holds only 1 Temporary Segment shared all by all user sessions. Each session takes one or more extents. When a session finishes its operation, it "releases" the extent it used for use by another session but the size of the Segment does NOT shrink.
    Therefore, the Segment would grow to the peak concurrent temporary extent usage -- eg at some point in time, if you had 4 very large queries running concurently taking up 8GB then the segment would have grown to 8GB. However, even if you never have such concurrent usage (for example the normal load is for 20 users concurrently taking up 500MB only !), the segment remains at 8GB.
    In some environments, the Temporary tablespace could grow during periodic (say Monthly Reporting) batch jobs after which it is dropped and recreated again.
    This segment is used not just for "SORT" operations. It is also used for HASH JOIN overflows to disk and also for SORT MERGE operations.
    You can monitor the size of the segment in V$SORT_SEGMENT. You can monitor users currently using it in V$SORT_USAGE or V$TEMPSEG_USAGE.
    Hemant K Chitale
    http://hemantoracledba.blogpsot.com

  • TEMP tablespace fills up quickly

    Hi All,
    I know this is a very classic question.
    In my client, we run annual reports during 1-2 days a year and the TEMP tablespace gets filled up very quickly.
    What is the best practice of managing the TEMP tablespace size in a very busy database. (Oracle Applications is running)
    Thanks,
    Sinan Topuz

    A temporary tablespace contains transient data that persists only for the duration of the session. Temporary tablespaces can improve the concurrency of multiple sort operations, reduce their overhead, and avoid Oracle Database space management operations. A temporary tablespace can be assigned to users with the CREATE USER or ALTER USER statement and can be shared by multiple users.
    Within a temporary tablespace, all sort operations for a given instance and tablespace share a single sort segment. Sort segments exist for every instance that performs sort operations within a given tablespace. The sort segment is created by the first statement that uses a temporary tablespace for sorting, after startup, and is released only at shutdown. An extent cannot be shared by multiple transactions.
    You can view the allocation and deallocation of space in a temporary tablespace sort segment using the V$SORT_SEGMENT view. The V$TEMPSEG_USAGE view identifies the current sort users in those segments.
    You cannot explicitly create objects in a temporary tablespace.
    Please note all this point.

  • Quaries using temp tablespace

    Dear all,
    Is there any script which gives the
    list of quaries which heavily uses temp tablespace.Because my temp tablespace size is 32 gb , some times usage will go till 28gb , and it will reset to 0,
    i need to know what quary it is running when the usage is at 28 gb.
    Please help me regard this,
    Regards,
    Vamsi.

    Check with below query.
    SELECT
    b.tablespace tablespace_name
    , a.username username
    , a.sid sid
    , a.serial# serial_id
    , b.contents contents
    , b.segtype segtype
    , b.extents extents
    , b.blocks blocks
    , (b.blocks * c.value) bytes
    FROM
    v$session a
    , v$sort_usage b
    , (select value from v$parameter
    where name = 'db_block_size') c
    WHERE
    a.saddr = b.session_addr
    ========= output =======================
    Tablespace Name Username SID Serial# Contents Segment Type Extents Blocks Bytes
    TEMP SYS 128 9 TEMPORARY LOB_DATA 1 128 1,048,576
    SYS 137 1 TEMPORARY DATA 1 128 1,048,576
    sum 2 256 2,097,152

  • Refresh Analytic Workspace increase tablespace size ?

    Hello, I'm using CWM2 OLAP objects with 9.2.0.6 database version. I have analytic workspaces, too.
    I execute refresh of my analytic workspace, using the script generated by Analytic Workspace Manager 9.2.0.4.1. I have noticed that, strangely, whenever I execute the script, it increases the used space of the tablespace containing analytic workspace.
    Is this usual ? The script doesn't include new objects, and the effect is the same. What is failing ? I think that this should not happen.
    Any idea ? Thanks a lot by your help

    vbarres wrote:
    if my datawarehouse
    grows dinamically (I'm adding new objects every day),
    what size has to have my aw tablespace ? It's
    difficult to reserve space on disk for this...I'm confused here. Are you really adding new objects every day, or just adding more data to the existing ones. In general, if you are adding more data, the growth should be reasonably predictable, assuming a reasonable AW design. The usual growth confusion has to do with reloading the same data over again, where the growth is unexpected.
    rhaug wrote:
    I had a similar problem in my AW. The temp and the aw tablespace got ridiculously big. >The temp tablespace exceeded 20gb before the disk got full and everything crashed.
    In my case I had made several cubes to perform different tests. When I deleted all but >one cube things behaved more normal and the aggregation time was stable.Again, I'm not sure what is going on here from the descriptions. As far as I know, there should not be a problem with multiple cubes in the same AW. You don't say what version you are in, but is it possibly version 10? I could see some interaction in a parallel build, where the various cubes are built simultaneously, and thus the pages on the free list are necessarily available for reuse when you might want them. More details would be interesting here. You might also try a serial build (I'm not sure where the switch is in AWM, but I'm sure it's there somewhere).

  • Should We consider Temp Data Files While Estimating The Database Size

    Hi,
    The Database Size is sum of physical files like
    Control file
    redo log file
    datafiles
    temp files
    so i want to know why are we considering the temp files..Because it's temporary. At one stage of database, temp size it could me more and at one stage it could be less.
    So why consider the temp file???
    Please share your views on it..
    Thanks
    Umesh

    So, in essence the size of your datafiles is the size of your tablespaces?No. The size of the tablespace is the sum of the sizes of the datafiles in the tablespace --- i.e. the datafiles determine the tablespace size, not the other way round.
    (Although when you CREATE or ALTER TABLESPACE, you specify the sizes of the datafiles that you want to belong to the tablespace).
    the temporary tablespace has space allocated to it regardless of whether there are temporary tables in that tablespace or not.Two points here :
    1. On most OSs the temporary tablespace tempfile is created as a "sparse" file. So, if you issue a CREATE TEMPORARY TABLESPACE TEMP TEMPFILE 'xyz.dbf' SIZE 1000M; and then did an "ls -l" at the OS level, "xyz.dbf' would appear to be only a few tens of KBs in size. The OS "grows" the file to 1000M as necessary.
    When talking to your OS administrator ensure that you get 1000M (or the AUTOEXTEND MAXSIZE !!) space allocated even though he might "see" only a few 10s of KBs used on the first day.
    2. The temporary tablespace does not have objects (other than "global temporary tables" that overflow from memory to disk). It is really temporary space for joins, sorts, order bys etc.
    So, your datafile size is not affected regardless of your temporary tables coming and going.Yes, your datafile sizes and tempfile sizes are independent. Yet, when "sizing" disk space for the database you must include the tempfile size. However, when reporting to IT Management with a statement "our database size is ".. you might want to break it up into components like Data Dictionary, Tables, Indexes, TemporarySpace, RedoLogs and ArchiveLogs. You could also differentiate between OS-allocated space (sizes of datafiles) and Oracle-allocated space (sizes of segments) and actual used space (which you'd have to compute !) .
    Hemant K Chitale
    Edited by: Hemant K Chitale on Feb 17, 2011 10:42 PM
    Added (Although ....) paragraph to first point.

  • TEMP tablespace increasing

    I have a problem with storage space of my default temporary table space.
    For my application, I specified the default table space as "DEFTBSPACE" with size 4000MB and temporary table space as "TEMP" with size 14486MB. Now, my usage of my temporary table space is increasing rapidly (Now, the used temp tablespace is 14485MB almost 99.99%). What could be the reason..? Is there any thing going into TEMP tablespace by mistake?.
    Please help.
    Reagrds,
    Satish.

    Can we deallocate manually the data file or a part of the datafile so that the usage space is reduced. What's the solution to reduce the usage space of this TEMP tablespace.If you bounce the db, you will get all used space.
    I heared, dropping and recreating the TEMP tablespace is the only the solution for this..??Is it true?
    Yes it is absolutely true.
    Create another temp tabelspace and set as default temp tablespace and drop the previous one. However, make sure no one is currently using that temp tablespace.
    The reason that you haven't get any result query v$sort_usge is that no one is using temp currently.
    You can also use v$tempseg_usage.
    Jaffar
    OCP DBA

  • To shrink the size of TEMP tablespace

    Dear all,
    There is a databse with RAC, now in OEM the size of TEMP tablespace has been reached at 99.9%. now we want to shrink the size of TEMP tablespace.
    how to we do that???????
    plz help me...........

    Temporary tablespaces usually show they are full, however this space is not actually in use. It is rather allocated. Oracle has evaluated the best way to obtain the most of performance, and he said it is better to allocate once than allocate-deallocate-reallocate extents, so temporary space is not 'released'.
    If you want to feel psychologically more confortable with lower allocated space, you can drop your tablespace (create an interim default temporary tablespace first) and recreate it.
    You can also rebuild temporary datafiles:
    alter tablespace temp add tempfile 'C:\ORACLE\ORACLEXE\ORADATA\XE\TEMP01.dbf' size 32m;
    SQL> select name from v$tempfile;
    NAME
    C:\ORACLE\ORACLEXE\ORADATA\XE\TEMP.DBF
    C:\ORACLE\ORACLEXE\ORADATA\XE\TEMP01.DBF
    SQL> alter database tempfile 'C:\ORACLE\ORACLEXE\ORADATA\XE\TEMP01.DBF' drop including datafiles;
    Database altered.

Maybe you are looking for