Undo Tablespace and Temporary Tablespace - autoextend ?

- In general, should I allow the Undo Tablespace to grow (autoextend)?
- In general, should I allow the Temporary Tablespace to grow (autoextend)?

The size of undo tablespace should always keeps in mind otherwiase you eill get ORA-1555 or out of space errors.
This paper is to help DBA’s in calculating the size of UNDO tablespace by using a simple formula.
It is tough to know about the number of transactions and subsequently number of rows changed per second.
So I suggest having a “big undo tablespace” to start with and based on load, after doing some calculations and resize your UNDO tablespace.
In my case one of the applications was going to production (live), and I had no idea that how many transactions will happen against this database. All what I was told that there will be optimum (transactional) activity on this database.
So I started with UNDO tablespace with size of 3GB and datafiles with autoextend “on” .
Note:
In production, you must be very careful in using this (autoextend on) as the space may grow to inifinity very fast. So my advice is either dont use this option, or use with "maxsize" or continuously monitor space (which is tough).
I month later, I noticed the activity from V$undostat.
Here is the step by step approach:
Step 1: Longest running query.
SQL> select max(maxquerylen) from v$undostat;
MAX(MAXQUERYLEN)
1793
This gives you ideal value for UNDO_RETENTION. To be on the safer size you should add few more seconds to get the right value. So in my case, the size of undo retention should be say 2000 secs.
Step 2: Size of UNDO tablespace.
Size of UNDO needed = UNDO_RETENTION x [UNDO block Generation per sec x DB_BLOCK_SIZE] + Overhead(30xDB_BLOCK_SIZE)
Out of these we know UNDO_RETENTION and DB_BLOCK_SIZE
All we need is to find out “UNDO Blocks per second”
Which can be easily fetched from v$undostat
SQL> SELECT (SUM(undoblks))/ SUM ((end_time - begin_time) * 24*60*60) "UPS"
2 FROM v$undostat;
UPS
8.11985583
V$undostat stores data for every 10 mins and begin/end times are start/end time of those intervals. We multiplied it with 24*60*60 because the difference between two dates will be in days and to get to seconds, we need it to multiply with 24hrs*60mins*60secs
So now we have all the values needed.
Undo size needed = [8.12 x 2000 x 8192] + [30 x 8192] = 133283840 bytes = 127.11 MB

Similar Messages

  • DEFAULT TABLESPACE and TEMPORARY TABLESPACE for eBusiness Suite database

    Hi:
    What is the
    DEFAULT TABLESPACE and TEMPORARY TABLESPACE
    for eBusiness Suite database.
    I want to create a new schema on the eBusiness Suite database.
    Please help

    DEFAULT TABLESPACE and TEMPORARY TABLESPACE
    for eBusiness Suite database.
    I want to create a new schema on the eBusiness Suite database.Create a new tablespace and temporary tablespace for your custom schema (you may use the existing temporary tablespace).
    Integrating Custom Applications with Oracle Applications Release 11i [ID 176852.1]
    Step By Step Guide to Creating a Custom Application in Applications 11i [ID 216589.1]
    Thanks,
    Hussein

  • Alter user default tablespace and temporary tablespace

    Hi guru,
    target : to ensure that users don't have the SYSTEM tablespace as their TEMPORARY or DEFAULT tablespace
    scenario :
    user default tablespace temporary tablespace
    xxyym system system
    Question: How to alter user ?
    tq

    In a scenario, let's say you want to make USERS the default tablespace for existing users and TEMP the default temporary tablespace, you can also create the alter statements as below into one script based on the output and run it.
    select 'ALTER USER '||username||' DEFAULT TABLESPACE USERS;'  FROM DBA_USERS WHERE DEFAULT_TABLESPACE IN('SYSTEM')
    and username not in('SYS','SYSTEM');
    select 'ALTER USER '||username||' TEMPORARY TABLESPACE TEMP;'  FROM DBA_USERS WHERE TEMPORARY_TABLESPACE IN('SYSTEM');As magnus mentioned, don't forget to do this(if USERS and TEMP is what you want to go with) :
    ALTER DATABASE DEFAULT TABLESPACE USERS;
    ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMP;

  • Move undo and temporary tablespace to new path

    Hi All,
    I want to move my undo and temporary tablespace to new path because of space issue. I am using Oracle 10g release 2 and working on production server can't take shutdown without prior permission.
    Please tell me the steps to do so...
    thanks
    Api

    About create/change/drop
    UNDO:
    SQL>show parameter undo
    NAME TYPE VALUE
    undo_management string AUTO
    undo_retention integer 900
    undo_tablespace string UNDOTBS1
    SQL> CREATE UNDO TABLESPACE undotbs2 DATAFILE '+DATA_NEWPATH' SIZE 100M AUTOEXTEND ON;
    http://www.oracle-base.com/articles/9i/AutomaticUndoManagement.php
    SQL> alter system set undo_tablespace=undotbs2;
    *** after that can drop UNDOTBS1
    TEMP:
    SQL> CREATE TEMPORARY TABLESPACE TEMP TEMPFILE '+DATA_NEWPATH' SIZE 500M AUTOEXTEND ON NEXT 100M MAXSIZE unlimited EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M;
    http://www.idevelopment.info/data/Oracle/DBA_tips/Tablespaces/TBS_3.shtml
    SQL> ALTER DATABASE DEFAULT TEMPORARY TABLESPACE temp2;
    *** after that can drop old temp tablespace -> DROP TABLESPACE temp INCLUDING CONTENTS AND DATAFILES

  • Parallel execution and temporary tablespaces

    I have a large long running (1 hour) data warehouse query in a materialized view.
    If I parallelize it using the parallel hint then I run out of temporary tablespace.
    I've tried creating a bunch of temporary tablespaces and putting them into a temp tablespace group but it still runs out of space. Parallel execution seems to use up way more temp tablespace than sequential execution.
    I know it is a very general question, but what are the tips for parallelizing a long running query with respect to temporary tablespace management?
    I've tried searching on the interwebs but I don't find anything that addresses this particular issue.

    And here is the parallel explain plan:
    PLAN_TABLE_OUTPUT
    Plan hash value: 1293981491
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time | TQ |IN-OUT| PQ Distrib |
    | 0 | SELECT STATEMENT | | 81M| 17G| | 19232 (2)| 00:00:01 | | | |
    | 1 | TABLE ACCESS BY INDEX ROWID | MART$SC_SCORES | 1 | 13 | | 3 (0)| 00:00:01 | | | |
    |* 2 | INDEX UNIQUE SCAN | SSCS_SDCC_FK_I | 1 | | | 2 (0)| 00:00:01 | | | |
    | 3 | PX COORDINATOR | | | | | | | | | |
    | 4 | PX SEND QC (RANDOM) | :TQ10017 | 81M| 17G| | 19232 (2)| 00:00:01 | Q1,17 | P->S | QC (RAND) |
    |* 5 | HASH JOIN RIGHT OUTER BUFFERED | | 81M| 17G| | 19232 (2)| 00:00:01 | Q1,17 | PCWP | |
    | 6 | PX RECEIVE | | 41925 | 491K| | 2 (0)| 00:00:01 | Q1,17 | PCWP | |
    | 7 | PX SEND BROADCAST | :TQ10014 | 41925 | 491K| | 2 (0)| 00:00:01 | Q1,14 | P->P | BROADCAST |
    | 8 | PX BLOCK ITERATOR | | 41925 | 491K| | 2 (0)| 00:00:01 | Q1,14 | PCWC | |
    | 9 | INDEX FAST FULL SCAN | I_DWH_ZIP_ZIPCODE_EIDIID | 41925 | 491K| | 2 (0)| 00:00:01 | Q1,14 | PCWP | |
    |* 10 | HASH JOIN | | 81M| 16G| | 19218 (2)| 00:00:01 | Q1,17 | PCWP | |
    | 11 | JOIN FILTER CREATE | :BF0000 | 6414K| 159M| | 806 (2)| 00:00:01 | Q1,17 | PCWP | |
    | 12 | PX RECEIVE | | 6414K| 159M| | 806 (2)| 00:00:01 | Q1,17 | PCWP | |
    | 13 | PX SEND HASH | :TQ10015 | 6414K| 159M| | 806 (2)| 00:00:01 | Q1,15 | P->P | HASH |
    | 14 | PX BLOCK ITERATOR | | 6414K| 159M| | 806 (2)| 00:00:01 | Q1,15 | PCWC | |
    |* 15 | INDEX FAST FULL SCAN | I_DWH_ADDRESS_COMB_ZIP | 6414K| 159M| | 806 (2)| 00:00:01 | Q1,15 | PCWP | |
    | 16 | PX RECEIVE | | 80M| 14G| | 18397 (2)| 00:00:01 | Q1,17 | PCWP | |
    | 17 | PX SEND HASH | :TQ10016 | 80M| 14G| | 18397 (2)| 00:00:01 | Q1,16 | P->P | HASH |
    | 18 | JOIN FILTER USE | :BF0000 | 80M| 14G| | 18397 (2)| 00:00:01 | Q1,16 | PCWP | |
    |* 19 | HASH JOIN RIGHT OUTER BUFFERED | | 80M| 14G| | 18397 (2)| 00:00:01 | Q1,16 | PCWP | |
    | 20 | PX RECEIVE | | 42M| 409M| | 827 (2)| 00:00:01 | Q1,16 | PCWP | |
    | 21 | PX SEND HASH | :TQ10012 | 42M| 409M| | 827 (2)| 00:00:01 | Q1,12 | P->P | HASH |
    | 22 | PX BLOCK ITERATOR | | 42M| 409M| | 827 (2)| 00:00:01 | Q1,12 | PCWC | |
    | 23 | MAT_VIEW ACCESS FULL | MBI$CMN_ACTION_COST | 42M| 409M| | 827 (2)| 00:00:01 | Q1,12 | PCWP | |
    | 24 | PX RECEIVE | | 80M| 14G| | 17549 (1)| 00:00:01 | Q1,16 | PCWP | |
    | 25 | PX SEND HASH | :TQ10013 | 80M| 14G| | 17549 (1)| 00:00:01 | Q1,13 | P->P | HASH |
    |* 26 | HASH JOIN BUFFERED | | 80M| 14G| | 17549 (1)| 00:00:01 | Q1,13 | PCWP | |
    | 27 | PX RECEIVE | | 6312K| 794M| | 7519 (1)| 00:00:01 | Q1,13 | PCWP | |
    | 28 | PX SEND HASH | :TQ10010 | 6312K| 794M| | 7519 (1)| 00:00:01 | Q1,10 | P->P | HASH |
    |* 29 | HASH JOIN RIGHT OUTER BUFFERED | | 6312K| 794M| | 7519 (1)| 00:00:01 | Q1,10 | PCWP | |
    | 30 | VIEW | | 4443K| 80M| | 2125 (2)| 00:00:01 | Q1,10 | PCWP | |
    | 31 | HASH GROUP BY | | 4443K| 33M| 158M| 2125 (2)| 00:00:01 | Q1,10 | PCWP | |
    | 32 | PX RECEIVE | | 10M| 78M| | 950 (1)| 00:00:01 | Q1,10 | PCWP | |
    | 33 | PX SEND HASH | :TQ10007 | 10M| 78M| | 950 (1)| 00:00:01 | Q1,07 | P->P | HASH |
    | 34 | PX BLOCK ITERATOR | | 10M| 78M| | 950 (1)| 00:00:01 | Q1,07 | PCWC | |
    | 35 | TABLE ACCESS FULL | DWH$PHONE | 10M| 78M| | 950 (1)| 00:00:01 | Q1,07 | PCWP | |
    |* 36 | HASH JOIN | | 6312K| 680M| | 5392 (1)| 00:00:01 | Q1,10 | PCWP | |
    | 37 | PX RECEIVE | | 6329K| 36M| | 130 (2)| 00:00:01 | Q1,10 | PCWP | |
    | 38 | PX SEND HASH | :TQ10008 | 6329K| 36M| | 130 (2)| 00:00:01 | Q1,08 | P->P | HASH |
    | 39 | PX BLOCK ITERATOR | | 6329K| 36M| | 130 (2)| 00:00:01 | Q1,08 | PCWC | |
    | 40 | INDEX FAST FULL SCAN | PK_DWH_DEBTOR | 6329K| 36M| | 130 (2)| 00:00:01 | Q1,08 | PCWP | |
    | 41 | PX RECEIVE | | 6312K| 644M| | 5259 (1)| 00:00:01 | Q1,10 | PCWP | |
    | 42 | PX SEND HASH | :TQ10009 | 6312K| 644M| | 5259 (1)| 00:00:01 | Q1,09 | P->P | HASH |
    |* 43 | HASH JOIN RIGHT OUTER BUFFERED| | 6312K| 644M| | 5259 (1)| 00:00:01 | Q1,09 | PCWP | |
    | 44 | PX RECEIVE | | 3689K| 31M| | 4271 (1)| 00:00:01 | Q1,09 | PCWP | |
    | 45 | PX SEND HASH | :TQ10005 | 3689K| 31M| | 4271 (1)| 00:00:01 | Q1,05 | P->P | HASH |
    | 46 | VIEW | | 3689K| 31M| | 4271 (1)| 00:00:01 | Q1,05 | PCWP | |
    | 47 | HASH GROUP BY | | 3689K| 56M| 84M| 4271 (1)| 00:00:01 | Q1,05 | PCWP | |
    | 48 | PX RECEIVE | | 3689K| 56M| | 3653 (1)| 00:00:01 | Q1,05 | PCWP | |
    | 49 | PX SEND HASH | :TQ10003 | 3689K| 56M| | 3653 (1)| 00:00:01 | Q1,03 | P->P | HASH |
    |* 50 | HASH JOIN | | 3689K| 56M| | 3653 (1)| 00:00:01 | Q1,03 | PCWP | |
    | 51 | BUFFER SORT | | | | | | | Q1,03 | PCWC | |
    | 52 | PX RECEIVE | | 3 | 21 | | 1 (0)| 00:00:01 | Q1,03 | PCWP | |
    | 53 | PX SEND BROADCAST | :TQ10000 | 3 | 21 | | 1 (0)| 00:00:01 | | S->P | BROADCAST |
    | 54 | INLIST ITERATOR | | | | | | | | | |
    |* 55 | INDEX RANGE SCAN | I_DWH_PAYMENT_TYPE_EIDIID | 3 | 21 | | 1 (0)| 00:00:01 | | | |
    | 56 | PX BLOCK ITERATOR | | 28M| 242M| | 3648 (1)| 00:00:01 | Q1,03 | PCWC | |
    |* 57 | TABLE ACCESS FULL | DWH$PAYMENT | 28M| 242M| | 3648 (1)| 00:00:01 | Q1,03 | PCWP | |
    | 58 | PX RECEIVE | | 6312K| 589M| | 986 (2)| 00:00:01 | Q1,09 | PCWP | |
    | 59 | PX SEND HASH | :TQ10006 | 6312K| 589M| | 986 (2)| 00:00:01 | Q1,06 | P->P | HASH |
    |* 60 | HASH JOIN | | 6312K| 589M| | 986 (2)| 00:00:01 | Q1,06 | PCWP | |
    | 61 | PX RECEIVE | | 2937 | 172K| | 5 (20)| 00:00:01 | Q1,06 | PCWP | |
    | 62 | PX SEND BROADCAST | :TQ10004 | 2937 | 172K| | 5 (20)| 00:00:01 | Q1,04 | P->P | BROADCAST |
    |* 63 | HASH JOIN BUFFERED | | 2937 | 172K| | 5 (20)| 00:00:01 | Q1,04 | PCWP | |
    | 64 | PX RECEIVE | | 220 | 1540 | | 2 (0)| 00:00:01 | Q1,04 | PCWP | |
    | 65 | PX SEND HASH | :TQ10001 | 220 | 1540 | | 2 (0)| 00:00:01 | Q1,01 | P->P | HASH |
    | 66 | PX BLOCK ITERATOR | | 220 | 1540 | | 2 (0)| 00:00:01 | Q1,01 | PCWC | |
    | 67 | TABLE ACCESS FULL | DWH$MANDATOR | 220 | 1540 | | 2 (0)| 00:00:01 | Q1,01 | PCWP | |
    | 68 | PX RECEIVE | | 2937 | 152K| | 2 (0)| 00:00:01 | Q1,04 | PCWP | |
    | 69 | PX SEND HASH | :TQ10002 | 2937 | 152K| | 2 (0)| 00:00:01 | Q1,02 | P->P | HASH |
    | 70 | PX BLOCK ITERATOR | | 2937 | 152K| | 2 (0)| 00:00:01 | Q1,02 | PCWC | |
    | 71 | TABLE ACCESS FULL | DWH$PACKAGE | 2937 | 152K| | 2 (0)| 00:00:01 | Q1,02 | PCWP | |
    | 72 | PX BLOCK ITERATOR | | 6312K| 228M| | 980 (1)| 00:00:01 | Q1,06 | PCWC | |
    | 73 | TABLE ACCESS FULL | DWH$CASE | 6312K| 228M| | 980 (1)| 00:00:01 | Q1,06 | PCWP | |
    | 74 | PX RECEIVE | | 78M| 4199M| | 10016 (1)| 00:00:01 | Q1,13 | PCWP | |
    | 75 | PX SEND HASH | :TQ10011 | 78M| 4199M| | 10016 (1)| 00:00:01 | Q1,11 | P->P | HASH |
    | 76 | PX BLOCK ITERATOR | | 78M| 4199M| | 10016 (1)| 00:00:01 | Q1,11 | PCWC | |
    |* 77 | TABLE ACCESS FULL | DWH$ACTION | 78M| 4199M| | 10016 (1)| 00:00:01 | Q1,11 | PCWP | |
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------

  • EXPDP tablespace and IMPDP tablespace - who owns the tablespace data?

    Hi Gurus
    Sorry - new to this. Thank you for replies in advance.
    10.2.0.3 - Windows 2003. Done some googling but not got the answer.
    Have been asked by developer to export multiple tablespaces (on one server) into a new database (on another server) but import into just one tablespace.
    Unable to use transportable tablespaces because software owner says it doesn't work.
    However, developer says can use data-pump in 10g to do this.
    Have created the same repository on both databases under the system account and same path name on both servers.
    Have used expdp system/password tablespace=(tablespace_name1, tablespace_name2, etc) to create the dmp file and copied it over to the new database server.
    Now about to import it into the new database into just one tablespace.
    If I export all the multiple tablespaces and then import them into the one tablespace - under the system account - how does Oracle work out who owns the tables in the tablespace?
    The tables, themselves, are owned by multiple owners (not all these users are created in the new database as the developer's ultimate idea is that it is only one new schema is created for the multiple tablespace data).
    Before doing it I wonder - even though I've specified no schema etc - seems to me that system owns this data and all the data in the tablespace if I do import it successfully using remap tablespace=source: new tablespace.
    I saw the system tablespace increase (thought it would but not what is desired, I'm guessing as I can't identify it clearly when looking - so it maybe there unnecessarily forever.
    Seems to me I've put stuff into my system tablespace that will be there forever (unless I do something about it) on database1.
    But if I impdp to database2 to new tablespace - under the system owner - then it will still be in the system tablespace and still owned by the system schema.
    Is this correct thinking?
    Should I create the old owners of the schemas in order for the impdp to succeed?
    And if correct - is it possible to then allocate those tables in that tablespace to a new schema owner - and is there a way to do it at the time of import or do I have to then do some clever magical guru stuff to change it?
    Thanks Gurus.
    Please ask questions if I've not made myself clear.
    Thanks again.

    Thank you Guru for your reply.
    No, I am not trying to create the same database elsewhere.
    I am definitely not trying to not create a clone.
    I would like to understand that, as I have a dmp file created for multiple tablespaces via expdp - under the system user - as I now want to dmp that file under one user - and can do via impdp - who owns the data - and if I have transferred via system user - is it the system user who owns the data in the tablespace now - or can I transfer it to a new named user?
    Thanks Gurus.

  • Best settings for sort_area_size and temporary tablespace??

    Hi, I'm trying to tune a data extract from a database which extracts records created by selects which concatenate various fields to form a record less than 100 characters long. The records are then loaded into a reporting cube.
    When it is run there are 8 instances of the extract package running which write to a separate file. When the procedures are finished Unix sorts them and merges them together.
    In terms of volume I am returning approx 280,000 records per day going back 4 years, with each instance of the procedure given a different date range.
    Currently the average procedure takes 4 hours to complete, but the sort and merge takes a further 6 hours.
    I would like to let Oracle do the sort, as even tough Oracle and unix sort the records slightly differently, this shouldn't impact the load to the reporting cube too much.
    What should I set the sort_area_size to, it currently stands at 1Mb,
    shared pool size is 200Mb.
    Any advice is welcome!!

    What should I set the sort_area_size to, it currently stands at 1Mb <<How would we know, you provide absolutely no information on user load and how much free memory your server has available. And are the sessions in question connected using dedicated sessions or shared server connections?
    Based on 280K 100 byte rows per day X 4 years the sort is going to disk. I would make sure my temp tablespace was stripped accross as many disk units as possible. And you should probably verify that you have at least 22G of sort available within the database. ( I figured at 200 days of data per year not 365 so if you have data for 7 days a week the temp estimate has to go up)
    HTH -- Mark D Powell --

  • Available tablespaces and default tablespace

    Hi,
    I login as a common user USER1 with privileges that allow me to create tables for USER2.
    I don't know how to
    1) get default tablespace for USER2
    2) get all available tablespaces for USER2
    For my USER1 I use "user_users" and "user_tablespaces".
    Does anyone know what to do? (not using DBA views).
    PS. Don't ask me why I need it :)

    Hi,
    USER_TABLESPACES describes the tablespaces accessible to the current user. Its columns (except for PLUGGED_IN) are the same as those in DBA_TABLESPACES.
    DBA_TABLESPACES describes all tablespaces in the database.
    USER_TABLESPACES describes the tablespaces accessible to the current user. This view does not display the PLUGGED_IN column.
    http://download-uk.oracle.com/docs/cd/B19306_01/server.102/b14237/statviews_4157.htm#i1627812
    Adith

  • A script to accept dafault tablespace and tempspace at runtime create users

    I need to write a script to accept default tablespace and temporary tablespace , then create the users in that tablespace. Please see the example but some how it is not working....
    prompt Specify user's default tablespace
    prompt Using &&default_tablespace for the default tablespace
    prompt Specify user's temporary tablespace
    prompt Using &&temporary_tablespace for the temporary tablespace
    create user test identified by test default tablespace &&default_tablespace temporary tablespace &&temporary_tablespace ;
    grant connect , resource to test;
    Please help me in identifying the errors
    Thanks in advance...
    Message was edited by:
    mvarier

    some how it is not workingHow ? Doesn't the user get created ? Do you get errors ? which errors ?
    (It worked to me)

  • Temporary Tablespace Sizing and SNOTE 164925

    Hi All,
    I am facing a dilemma when I look into the temporary tablespace setting.
    I have gone thru the SNOTE 164925, for the sizing parameters of PSAPTEMP.
    There is a calculation on the note for selecting initial extent next extent etc.....
    My PSAPTEMP is locally managed and having default initial extent value of 1 MB but as per the calculation given on SNOTE 164925 solution section.
    But the point is in the How Can I check the specified value section on the same note it says....
    "As of Oracle 8i, SAP recommends using the assignment of locally managed
    temporary tablespaces (see Notes 659946 and 662900). This means that when
    problems with a 'dictionary managed' temporary tablespace occur, you should
    change to a 'locally managed' temporary tablespace instead of optimizing
    the settings of the 'dictionary managed' temporary tablespace."
    Now my question is whther I should still go with the default value or with the new values as per the formula given in the same note.
    I am using Oracle 10g behind SAPR3 4.6D
    Regards,
    Soumen

    Hello Soumen,
    to be honest - i don't really understand your question / problem.
    Just use locally managed temporary tablespace and set an uniform size.
    The values initial, next and pctincrease doesn't matter in this case. Set the uniform size to 1 - 5 MB.
    As you told us you are using oracle 10g .. just check the documenation:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_7003.htm#CJAIDDDB
    Specify LOCAL if you want the tablespace to be locally managed. Locally managed tablespaces have some part of the tablespace set aside for a bitmap. This is the default for permanent tablespaces. Temporary tablespaces are always automatically created with locally managed extents.
    AUTOALLOCATE specifies that the tablespace is system managed. Users cannot specify an extent size. You cannot specify AUTOALLOCATE for a temporary tablespace.
    UNIFORM specifies that the tablespace is managed with uniform extents of SIZE bytes.The default SIZE is 1 megabyte. All extents of temporary tablespaces are of uniform size, so this keyword is optional for a temporary tablespace. However, you must specify UNIFORM in order to specify SIZE. You cannot specify UNIFORM for an undo tablespace.
    Restriction on Dictionary-managed Tablespaces
    You cannot specify DICTIONARY if the SYSTEM tablespace of the database is locally managed or if you have specified the temporary_tablespace_clause.
    Regards
    Stefan

  • Setting the default default tablespace and default temporary tablespace

    Is there a way to set the default default tablespace and default temporary tablespace database wide? I want to assign default and temporary tablespaces other than SYSTEM to all new users without having to explicitly define the tablespace names.

    Hi,
    Well, I assume that OP is using 10g, but exactly what you said, in Oracle 9i, it became possible to specify the default temporary tablespace in the database. In Oracle 10g, it allows all users to set up the default permanent tablespace to set the permanent tablespace used by default. Before Oracle 10g, if the default permanent tablespace is not set up when creating the user, SYSTEM tablespace will be set up as the default permanent tablespace by default.
    Cheers

  • ERP application and multiple tablespaces

    Hi All,
    I am trying to build a ERP style application in my company...modules are Accounting, Purchase, Sales, Export, Payroll & HR.
    So far I have finished Accounting..What I did is.
    1. Created one table space called ERPShared and created tables in it which are shared among all the applications.
    script is as follows.
    CREATE TABLESPACE "ERPSHARED_DATA"
    LOGGING
    DATAFILE 'D:\XP\oracle\product\HGDB\oradata\ERPShared\SHARED_DATA01.DBF' SIZE 100M
    AUTOEXTEND ON
    EXTENT MANAGEMENT LOCAL UNIFORM SIZE 3M
    SEGMENT SPACE MANAGEMENT  AUTO ;
    CREATE USER "ERPADMIN"  PROFILE "DEFAULT" IDENTIFIED BY "erpadmin"
    DEFAULT TABLESPACE "ERPSHARED_DATA"
    TEMPORARY TABLESPACE "TEMP" 
        QUOTA UNLIMITED ON "ERPSHARED_DATA"
        QUOTA UNLIMITED ON "ERPSHARED_DATA_INDX"
        QUOTA 0         ON "SYSTEM"
        ACCOUNT UNLOCK;
    GRANT CREATE SESSION TO "ERPADMIN";
    GRANT CREATE TYPE TO "ERPADMIN";
    GRANT CONNECT, RESOURCE TO "ERPADMIN";
    GRANT CREATE ANY TRIGGER TO ERPADMIN;
    GRANT ALTER ANY TRIGGER TO ERPADMIN;
    GRANT DROP ANY TRIGGER TO ERPADMIN;
    GRANT CREATE ANY PROCEDURE TO ERPADMIN;
    GRANT ALTER ANY PROCEDURE TO ERPADMIN;
    GRANT DROP ANY PROCEDURE TO ERPADMIN;
    GRANT CREATE VIEW TO ERPADMIN;First of all plz tell me is this the right way of creating tablespace?
    Second I want guidance from you guys that I have another user "Purchase" and other users too and HOW to assign this ERPShared tablespace to other users or shoud I keep all the tables in one ERPShared tablespace with one user? what is the correct method performance wise and concept wise.
    Thanks

    You should create seperate Users for different modules of the applications.
    This will keep the system neat and clean.
    Modularization is the key, and that is why you are creating seperate modules rather than creating 1 big application :)
    HOW to assign this ERPShared tablespace to other users or shoud I keep all >>the tables in one ERPShared tablespace with one userRefer to the script for creating user (in your post)
    CREATE USER "ERPADMIN" PROFILE "DEFAULT" IDENTIFIED BY "erpadmin"
    DEFAULT TABLESPACE "ERPSHARED_DATA"DEFAULT TABLESPACE clause will assign this user objects onto the given tablespace name ("ERPSHARED_DATA" in your case). So to assign the same tablespace to other users, you must mention this tablespace while creating other USERS.
    Generally, it is advisable to keep seperate tablespaces for different Users.
    Example:
    TABLESPACE USER
    ERPSHARED_DATA ERPADMIN
    ERP_PURCHASE_DATA PURCHASE
    ERP_SALES_DATA SALES
    In many cases, more than 1 tablespace for 1 user. For instance, if all the Large tables will be created in 1 common tablespace which will have big datafile.
    You can find more:
    http://72.14.235.104/search?q=cache:Z3DayME5gSEJ:proligence.com/noug_dw.doc+advantages+of+creating+separate+tablespaces&hl=en&ct=clnk&cd=2&gl=in
    Search for keyword "Tablespaces"
    Cheers,
    Aalap Sharma :)

  • ORA-03212 temporary tablespace

    Hi all,
    we run a single instance database on file system (no ASM).
    The database has benn running fine for several weeks now. 2 days ago however the following error came up:
    "*** MODULE NAME:(DBMS_SCHEDULER) 2012-09-02 06:00:03.470
    *** ACTION NAME:(MGMT_CONFIG_JOB_1) 2012-09-02 06:00:03.470
    ERROR: kfnUseConn - failure to make a connection
    ORA-03212: Temporary Segment cannot be created in locally-managed tablespace".
    I changed the user's (oracle_ocm) temp tablespace to "TEMPORARY LOCAL". which should avoid that error in future.
    My question:
    What is the appropriate temporary tablespace for system users?
    We run quite a lot of databases that were created with version 7.x and migrated up to version 10 or 11. They all used to have PERMANENT tablespaces as temp tbs for the users 'SYS, SYSTEM, DIP, APPQOSSYS, CSMIG' which did not make any problems up to now.
    Should I change default temporary tbs to TBLSPC_TEMP for all users including those mentioned above?
    FJH

    Please post output of below commands :
    1. select tablespace_name from dba_data_files where tablespace_name like '%TEMP%';
    If you gets any name here, it means your temp tablespace is not really a temp one, its a permanent one whose name is temp, because if you have created temp tablespace with the TEMPFILE keyword, then only its a really temp tablespace. DBA_DATA_FILES do not shows the datafiles which have been created with TEMPFILE keyword.
    2.set long 999999;
    SELECT DBMS_METADATA.GET_DDL('TABLESPACE','TEMP') FROM DUAL;
    In above output if you don't see TEMPFILE keyword then ORA-03212 is correct and as documented.
    Now, if you want your TEMPORARY tablespace to be Locally Managed then you should use the TEMPFILE clause and NOT DATAFILE while creating the TEMPORARY TABLESPACE.
    create temporary tablespace temp tempfile
    '/u10/oradata/cprpt/temp01.dbf' size 250M reuse,
    '/u10/oradata/cprpt/temp02.dbf' size 250M reuse,
    '/u10/oradata/cprpt/temp03.dbf' size 250M reuse,
    '/u10/oradata/cprpt/temp04.dbf' size 250M reuse
    extent management local uniform size 3M;
    http://www.dbasupport.com/forums/showthread.php?t=31317
    Regards
    Girish Sharma

  • TEMPORARY TABLESPACE에서, TEMPFILE을 사용할지, DATAFILE을 사용 할지 결정에 필요한 지침

    제품 : ORACLE SERVER
    작성날짜 : 2003-02-24
    TEMPORARY TABLESPACE에서, 임시 파일을 사용할지, 데이터파일을 사용 할지 결정에 필요한 지침
    ===========================================================================================
    PURPOSE
    이 문서는, TEMPORARY TABLESPACE에서 임시 파일과 데이터파일의 차이점을
    소개하는 데 목적이 있다.
    Explanation
    | TEMPORARY | Tablespace |
    | tablespace | TEMPORARY |
    | Locally | Dictionary |
    | managed | managed |
    | Datafiles | impossible | Y |
    | Tempfiles | Y | impossible |
    ------------------------------------------+
    다른 조합은 허용되지 않는다.
    1. TEMPORARY Tablespace / Tablespace TEMPORARY 와 PERMANENT tablespace 비교
    1) Tablespace TEMPORARY는 오라클 7.3 이상 버젼에서 사용가능하다.
    => Tablespace TEMPORARY는 다음과 같은 명령을 사용하여 생성한다.
    CREATE TABLESPACE .. TEMPORARY
    이 경우 데이터파일만을 사용한다.
    2) TEMPORARY tablespac는 오라클 8i 이상 버젼에서 사용 가능하다
    => TEMPORARY tablespace는 다음과 같은 명령을 사용하여 생성한다
    CREATE TEMPORARY TABLESPACE .. TEMPFILE
    이 경우 tempfile만 사용할 수 있다.
    3) Tablespace TEMPORARY/TEMPORARY tablespace는 DBA_TABLESPACES의
    CONTENTS 값이 TEMPORARY로 나타난다.
    4) Tablespace TEMPORARY/TEMPORARY tablespace 는 PERMANENT
    tablespace와 다르며 (DBA_TABLESPACES.CONTENTS 값이 PERMANENT임)
    permanent segment를 생성 할 수 없다. 예를 들어, permanent table이나
    index, cluster, rollback segment등을 Tablespace TEMPORARY/TEMPORARY
    tablespace에 생성할 수 없다.
    5) Tablespace TEMPORARY/TEMPORARY tablespace 에서는, 단일한
    temporary segment를 제공하며, 이 세그먼트는 다음과 같은
    요구사항을 가진 모든 사용자에 의해 공유된다.
    => sort 작업에 따른 sort extents를 필요로 하는 사용자
    => GLOBAL TEMPORARY TABLE에 필요한 temporary extents
    이와 같은 고유한 temporary segment는 동시에 많은 양의 sort 작업이
    수행되거나, 여러 트랜잭션이 동일한 temporary table을 사용할 때,
    permanent tablespace에서 작업하는 overhead를 피하고, 오라클의
    공간 관리 작업의 부하를 피하는데 도움을 준다.
    6) Temporary segment는 인스턴스 구동후 사용자가 sort extent나
    sort run, 또는 global temporary table 생성등의 요청에 따라
    자동적으로 생성된다.
    7) Temporary segment는 인스턴스 shutdown시 자동적으로 drop 된다.
    8) Temporary Content를 저장하는 테이블스페이스에 대한
    세그먼트의 공간 할당/할당 해제 관련 정보는 V$SORT_SEGMENT와
    V$SORT_USAGE 뷰를 사용하여 확인해 볼 수 있으며, sort segment
    등에 현재 sort를 진행하는 사용 정보를 보여준다.
    9) 위와 같은 작업을 수행하는데 PERMANENT tablespace 보다는
    tablespace TEMPORARY를 사용하는 것이 유리한 점은 <Bulletin No:
    11938>에 자세히 기술되어 있따.
    10) 오라클 8i에서는, 사용자별 default temporary tablespace가 어떤
    종류라도 상관이 없으나, PERMANENT locally managed 방식의 테이블
    스페이스는 지정할 수 없다. 다음은 PERMANENT locally managed 방식의
    테이블스페이스를 default temporary tablespace로 지정하여 발생하는
    에러이다.
    SQL> alter user x temporary tablespace PERM_LOCAL;
    User altered.
    SQL> select * from dba_tables order by 3,2,6,4,7,9,1,5;
    select * from dba_tables order by 3,2,6,4,7,9,1,5
    ERROR at line 1:
    ORA-03212: Temporary Segment cannot be created in locally-managed tablespace
    오라클 9i에서는 사용자별 default temporary tablespace가
    어떤 TEMPORARY 타입이라도 무방하다.
    => TEMPORARY tablespace locally managed
    => tablespace TEMPORARY dictionary managed
    PERMANENT locally-managed 타입의 테이블스페이스를 사용자의
    TEMPORARY tablespace으로 지정할 때 다음과 같은 에러가 발생한다.
    SQL> alter user x temporary tablespace PERM_LOCAL;
    alter user x temporary tablespace PERM_LOCAL
    ERROR at line 1:
    ORA-12911: permanent tablespace cannot be temporary tablespace
    2. TEMPORARY Tablespace/Tempfiles 대비 Tablespace TEMPORARY/Datafile
    1) 공간관리
    공간 관리는, locally managed tablespace에서 훨씬 단순하고, 또
    효율적이기 때문에, TEMPORARY tablespace를 사용하는 것이
    바람직하다. Local managedment 방식에서 사용 가능한 유일한
    방식이 temporary tablespace 방식이다.
    SQL> create tablespace temp1
    2 DATAFILE '/ora/ora817/32/oradata/V817/temp1.dbf' size 100M
    3 TEMPORARY
    4 EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K;
    create tablespace temp1
    ERROR at line 1:
    ORA-25144: invalid option for CREATE TABLESPACE with TEMPORARY contents
    Dictionary-managed tablespace 대비 locally-managed tableapce의 장점은
    <Bulletin No: 18261>에 자세히 기술되어 있다.
    오라클 8i에서는, sort segment가 locally managed permanent tablespace에
    생성될 수 없으므로, locally managed TEMPORARY tablespace를 사용하여야
    한다.
    Locally managed temporary tablespace는 tempfile을 사용하며, temporary
    tablespace 바깥 데이터에 전혀 영향을 주지 않으면서, temporary tablespace
    관련 데이터에 대한 redo정보가 생성되지 않는다.
    이 테이블스페이스는, standby database나 read-only database에서도
    사용 가능하다.
    2) View
    TEMPORARY tablespace 와 연관된 파일 목록은 V$TEMPFILE 과
    DBA_TEMP_FILES 뷰를 통해 확인할 수 있다.
    SQL> select * from dba_tablespaces;
    TABLESPACE_NAME CONTENTS EXTENT_MAN
    TEMP_TEMPFILE_LOCAL TEMPORARY LOCAL
    TEMP_DATAFILE_DICT TEMPORARY DICTIONARY
    SQL> select STATUS, ENABLED, NAME from v$tempfile;
    STATUS ENABLED NAME
    ONLINE READ WRITE /tcase/oradata/V901/temp_temp01.dbf
    SQL> select FILE_NAME, TABLESPACE_NAME from dba_temp_files;
    FILE_NAME TABLESPACE_NAME
    /tcase/oradata/V901/temp_temp01.dbf TEMP_TEMPFILE_LOCAL
    위 내용은 tablespace TEMPORARY 환경에서 V$DATAFILE 와
    DBA_DATA_FILES를 사용하는 것에 비길 수 있다.
    SQL> select STATUS, ENABLED, NAME from v$datafile;
    STATUS ENABLED NAME
    ONLINE READ WRITE /tcase/oradata/V901/temp_data01.dbf
    SQL> select FILE_NAME, TABLESPACE_NAME from dba_data_files;
    FILE_NAME TABLESPACE_NAME
    /tcase/oradata/V901/temp_data01.dbf TEMP_DATAFILE_DICT
    3) 권한
    Temporary tablespace 또는 tablespace temporary 생성을 위해서는
    CREATE TABLESPACE system privilege가 필요하다.
    4) TEMPORARY Tablespace 생성
    SQL> create TEMPORARY tablespace temp_tempfile_local
    2 TEMPFILE '/ora/V817/temp_temp.dbf' size 100M
    3 EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K;
    참고: 일부 OS에서는 tempfile block이 실제 액세스 되기
    전 까지 tempfile이 실제로 생성되지 않는다. 이와 같은
    파일 생성 작업이 지체되어 처리 되는 것은, tempfile의
    생성과 크기 조정이 신속하게 처리되는데 도움이 된다.
    그러나, tempfile이 나중에 생성되더라도, 생성 가능한
    충분한 디스크 공간이 있어야 하겠다.
    사용중인 O/S에서 tempfile이 실제 생성되는 시점은
    플랫폼별 매뉴얼에 기술되어 있다.
    Tablespace TEMPORARY의 생성
    SQL> create tablespace TEMP_DATAFILE_DICT
    2 datafile '/tcase/oradata/V901/temp_data.dbf' size 100M
    3 TEMPORARY;
    Tablespace created.
    5) Tempfile/Datafile 제거
    a. 테이블스페이스를 drop 하기 전까지 테이블스페이스의 datafile을
    제거할 수 없다.
    참고: 오라클 9i에서 DROP TABLESPACE 명령에 추가된
    INCLUDING CONTENTS AND DATAFILES 절을 사용하면, OS로 부터
    관련 데이터파일도 삭제하는 작업을 자동화 할 수 있다.
    b. Temporary tablespace로 부터 tempfile을 삭제하고, 논리 구조를
    비어 있는 상태로 유지할 수 있다.
    => 오라클 8i:
    SQL> alter tablespace TEMP_TEMPFILE_LOCAL
    2 add tempfile '/oradata/V817/temp_temp01.dbf';
    Tablespace altered.
    SQL> alter database tempfile '/oradata/V817/temp_temp01.dbf'
    2 drop;
    Database altered.
    SQL> !ls /oradata/V817/temp_temp01.dbf
    /oradata/V817/temp_temp01.dbf
    위 명령을 수행 한 후, tempfile을 시스템으로 부터 삭제하고,
    나중에 다시 추가 시킬 수 있다.
    SQL> alter tablespace TEMP_TEMPFILE_LOCAL
    2 add tempfile '/oradata/V817/temp_temp01.dbf';
    Tablespace altered.
    => 오라클 9i: OS 파일을 삭제 하기 위해 INCLUDING DATAFILES
    절을 사용할 수 있다.
    SQL> alter database tempfile '/oradata/V901/temp_temp01.dbf'
    2 drop including datafiles;
    Database altered.
    SQL> !ls /oradata/V901/temp_temp01.dbf
    /oradata/V901/temp_temp01.dbf not found
    Temporary tablespace로 부터 모든 tempfile을 삭제하면,
    다음과 같은 에러가 발생할 수 있다.
    SQL> alter table olap.test add primary key (c);
    alter table olap.test add primary key (c)
    ERROR at line 1:
    ORA-25153: Temporary Tablespace is Empty
    ORA-25153
    25153, 00000, "Temporary Tablespace is Empty"
    // *Cause: An attempt was made to use space in a temporary tablespace with
    // no files.
    // *Action: Add files to the tablespace using ADD TEMPFILE command.
    이 에러 메시지는 동시 작업 수행시 디스크를 실제 액세스 하여야
    할 경우 발생하게 된다.
    Example
    Reference Documents
    <Note:132663.1> ORA-03296 Resizing Temporary Locally Managed Tablespace
    <Note:131769.1> ORA-03212 at Instance Startup
    <Note:102339.1> Temporary Segments: What Happens When a Sort Occurs
    <Note:160426.1> TEMPORARY Tablespaces : Tempfiles or Datafiles

  • Temporary tablespace Query

    Hi all,
    I have a query that whether to create a separate temporary table space for all user's and set as there default tablespace or the temporary table space which is created while creating db can be set as default temporary tablespace for all user's. So what the effect of that

    If your database have not any default temporary tablespace then system tablespace is going to be use.Therefore , it is better to user the default temporary tablespace.
    the temporary tablespace which is created while creating db can be set as default temporary tablespace for all user's.Keep this temporary tablespace as default . your intention should be that you have a default temporary tablespace where user's sorting and other operations may take place . The default temporay tablespace may be created at db creation or you have created after the db creation ..
    As far error concerned you don't have physical tempfile on disk .
    Hope this may help you :)
    --neeraj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Maybe you are looking for

  • How can you define a different homepage for a user?

    Hi I am fairly new to Application express, I have created an application but I would like to define a different homepage for a user when they login. Of course I can modifiy the PLSQL code: wwv_flow_custom_auth_std.login( P_UNAME => :P101_USERNAME, P_

  • Keeps coming up as a error while trying to upload

    I have been uploading files in the past to Acrobat.com but it appears the larger the files the more difficult it is on some occasions, 2 in particular last night. I think some, maybe 2 or 3 may have been too large for the page, out of lets say 149 do

  • Program does not wait for user input

    Hi everyone, i am working on a program and there are 2 problems that i can't figure out. Since they are 2 different topics, I will do 2 posts. Just to give you some background on the program, it is a program that reads 3 txt files into 4 different ar

  • Recurring mDNSResponder request on port 5354 after 10.5.7?

    Since installing 10.5.7 I get a a network request from pm-members.mac.com for mDNSResponder on port 5354. I have Little Snitch and even if I authorize it forever, this request keeps on popping up on startup and exit. I was wondering if anyone knew ho

  • Form fields appear normal on my computer, but are too large on client's computer

    I recently created a fillable PDF using Acrobat Pro for a client. I have done this many times before, and never had any issues with formatting.  On my computer, the fields appear perfect, but on the client's computer they are too large and obscure th