Default temporary tablespace in 8i

Hi
is it possible to change the default temporary tablespace in oracle 8.1.6
SQL> Create temporary tablespace temp1 tempifle '/oradata/temp01' size 2000m;
SQ>alter database default temporary tablespace temp1; this shows invalid option for alter database

As far as I remember, there wasn't a default temporarary tablespace at the database level before 9i.
You need to define it at the user level.
Nicolas.

Similar Messages

  • How to set database default temporary tablespace in 8i?

    SQL> alter database default temporary tablespace temp3;
    alter database default temporary tablespace temp3
    ERROR at line 1:
    ORA-02231: missing or invalid option to ALTER DATABASE

    As far as I know, in Oracle 8i, you can not set the temporary tablespace as default at the database level; rather you can set it at the user level.
    SQL> alter user scott default temporary tablespace temp3;
    In Oracle 8i, the created users without specifying the default temporary tablespace, those users will by default assign to SYSTEM as default temporary tablespace.
    You may need to assign the temp3 temporary tablespace to all the users.
    Regards,
    Sabdar Syed.

  • Dropping default temporary tablespace

    Hi
    (regarding Oracle 9i)
    I am getting two conflicting messages. The first one says you cannot drop a default temporary tablespace, and the second one says you can and that SYSTEM then becomes the default temporary tablespace. Which one is correct?
    http://www.idevelopment.info/data/Oracle/DBA_tips/Tablespaces/TBS_12.shtml says: The DBA cannot drop a default temporary tablespace, but it is possible to assign a new default temporary tablespace and then drop the old one. You also cannot change a default temporary tablespace to a permanent tablespace, nor can you take a default temporary tablespace offline.
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96524/c04space.htm#1945 says: If you drop the default temporary tablespace, then the SYSTEM tablespace is used as the default temporary tablespace
    Which one is correct?!?!
    thanks

    select * from database_properties where property_name='DEFAULT_TEMP_TABLESPACE';
    PROPERTY_NAME
    PROPERTY_VALUE
    DESCRIPTION
    DEFAULT_TEMP_TABLESPACE
    TEMP
    Name of default temporary tablespace
    drop tablespace temp;
    drop tablespace temp
    ERROR at line 1:
    ORA-12906: cannot drop default temporary tablespaceBut as your earlier quotations make clear, there is nothing stopping from creating a NEW temporary tablespace, making that the default, and then dropping TEMP, the original-but-no-longer default.
    The principle is logical: a default's not much of a default if it can cease to exist. For a default to be meaningful, it has to be protected from being gotten rid of.
    The other thing you hinted at: the default default temporary tablespace is still SYSTEM, because it's the only tablespace that HAS to exist from the moment a database exists (though 10g elevates SYSAUX to almost the same status). So if you choose to create your database manually, using syntax of the form 'create database XXX....', it is allowed NOT to create a temporary tablespace. And if you choose to do that, then SYSTEM will be used as the default temporary tablespace.

  • (9I) DEFAULT TEMPORARY TABLESPACE의 개념과 사용 예제

    제품 : ORACLE SERVER
    작성날짜 : 2003-06-09
    (9I) DEFAULT TEMPORARY TABLESPACE의 개념과 사용 예제
    ===================================================
    PURPOSE
    Space Management와 관련된 Oracle 9i의 새로운 기능 중 Default
    Temporary Tablespace에 대하여 알아보기로 한다.
    Explanation
    데이터베이스 user를 생성할 때, 명시적으로 Temporary Tablespace를 지정하
    지 않으면 기본적으로 SYSTEM 테이블스페이스가 할당되고, 모든 temporary
    data는 이 SYSTEM 테이블스페이스에 저장된다. 9i에서는 데이터베이스 전체
    에 걸쳐 사용될 Default Temporary Tablespace로 임의의 Temporary
    Tablespace를 정의할 수 있다.
    만일 별도의 Temporary Tablespace를 생성하고, 이를 Default Temporary
    Tablespace로 지정하면 Temporary data를 저장할 공간으로 불필요하게
    SYSTEM 테이블스페이스를 사용할 이유가 없게 된다. (데이터베이스 생성 시
    정의할 수 있다.)
    데이터베이스 운영 중 아래와 같이 동적으로 변경할 수 있으며, 이 경우 기
    존 사용자의 Default Temporary Tablespace도 함께 변경이 된다.
    SQL> ALTER DATABASE ora9i DEFAULT TEMPORARY TABLESPACE dts2;
    Temporary type으로 만든 datafile은 dba_temp_files view를 보면 된다.
    Restrictions on Default Temporary Tablespace
    새로운 Default Temporary Tablespace가 가용하기 전에 기존 Default
    Temporary Tablespace를 drop할 수 없다.
    Default Temporary Tablespace를 Permanent Tablespace로 변경할 수 없다.
    Default Temporary Tablespace는 SYSTEM Tablespace이거나 Temporary Type
    Tablespace이어야만 한다.
    Default Temporary Tablespace는 OFFLINE으로 변경될 수 없다.
    Example
    As SYSTEM
    - 원래대로 Default Temporary Tablespace를 SYSTEM으로 복원
    SQL> alter database ora9i default temporary tablespace system;
    - 데이터베이스 user 생성 시 Temporary Tablespace 확인:SYSTEM tablespace
    사용
    SQL> create user omf_test identified by omf_test;
    SQL> select username, temporary_tablespace from dba_users where
    username = 'OMF_TEST'
    USERNAME TEMPORARY_TABLESPACE
    OMF_TEST SYSTEM
    - Default Temporary Tablespace를 TEMP tablespace(temporary type)로
    변경 :
    기존 사용자(OMF_TEST)의 Temporary Tablespace가 SYSTEM에서 TEMP로 변경
    됨을 알 수 있다.
    SQL> alter database ora9i default temporary tablespace temp;
    SQL> select username, temporary_tablespace from dba_users where
    username = 'OMF_TEST'
    USERNAME TEMPORARY_TABLESPACE
    OMF_TEST TEMP
    - 이제는 데이터베이스 user를 생성할 때, Temporary Tablespace가 SYSTEM이
    아닌 TEMP가 됨을 확인
    SQL> drop user omf_test;
    SQL> create user omf_test identified by omf_test;
    SQL> select username, temporary_tablespace from dba_users where
    username = 'OMF_TEST'
    USERNAME TEMPORARY_TABLESPACE
    OMF_TEST TEMP
    SQL> drop user omf_test;
    Reference Documents
    <Note:138212.1>

  • 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

  • After deleting files of default temporary tablespace.

    I'm just doing "Practice 7" in "Administration Workshop II, Students Guide".
    According to this guide I've deleted (at OS level) files of default temporary tablespace. I then restart the database and poerformed query that involves sorting of data.
    According guide I should receive a message:
    ORA-01157: cannot indetify/lock data file 201 - see DBWR trace file
    ORA-01110: data file 201: /home/oracle/oracle/oradata/temp1.dbf
    However, in my database the query runs without any problems. I then looked if the temp1.dbf file exists and it does. I suppose it was automaticaly created at database startup.
    Could you tell my why is the difference in work of my database in comparison to that in student guide?
    Thanks in advance.
    Jacek

    In trace file I have this:
    00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
    00000000 00000000 00000000 00000000 00000000 00000000
    External cache id: 0x0 0x0 0x0 0x0
    Absolute fuzzy scn: 0x0000.00000000
    Recovery fuzzy scn: 0x0000.00000000 01/01/1988 00:00:00
    Terminal Recovery Stamp 01/01/1988 00:00:00
    TEMP FILE #201: External File #401
    ERROR: Record not owned by caller (7, 1)
    (name #8) /home/oracle/oracle/oradata/orcl/temp01.dbf
    creation size=2560 block size=8192 status=0x1c head=8 tail=8 dup=1
    tablespace 3, index=5 krfil=1 prev_file=0
    unrecoverable scn: 0x0000.0006cec7 11/20/2006 13:02:01
    ORA-01122: database file 201 failed verification check
    ORA-01110: data file 201: '/home/oracle/oracle/oradata/orcl/temp01.dbf'
    ORA-01565: error in identifying file '/home/oracle/oracle/oradata/orcl/temp01.dbf'
    ORA-27037: unable to obtain file status
    Linux Error: 2: No such file or directory
    Additional information: 3
    ORA-01258: unable to delete temporary file /home/oracle/oracle/oradata/orcl/temp01.dbf
    I don't see any information about creation of missing tempfile, however.

  • Creating a Global Temporary Table on non-default TEMP tablespace.

    Hello ,
    I am using Oracle 11g.
    I have a procedure which create global temporary tables for its functionality. As the data which is going in the global temporary table , mean the data which is going in the default TEMP tablesapce is too huge ..... billions of rows..
    So what i want to do is , I want to create the global temporary table in another TEMP2 tablespace ( which is not the default one) so the load of billions of rows of data will be shifted to TEMP2. The default TEMP tablespace will not be affected and it can be used for other transactions.
    Is this possible. Can i shift the global temporary table from TEMP( Default temp tablespace) to TEMP2 ( the non-default temp tablespace) ????
    Please guide me with proper solutions and examples ....
    Thanks in advance ..

    DBA4 wrote:
    Hello ,
    I am using Oracle 11g.
    I have a procedure which create global temporary tables for its functionality. As the data which is going in the global temporary table , mean the data which is going in the default TEMP tablesapce is too huge ..... billions of rows..
    So what i want to do is , I want to create the global temporary table in another TEMP2 tablespace ( which is not the default one) so the load of billions of rows of data will be shifted to TEMP2. The default TEMP tablespace will not be affected and it can be used for other transactions.
    Is this possible. Can i shift the global temporary table from TEMP( Default temp tablespace) to TEMP2 ( the non-default temp tablespace) ????
    Global temporary tables are instantiated in the temporary tablespace of the schema that inserts the data - not into "the default" temporary tablespace.
    Assume Schema1 creates a GTT and grants all on that table to schema2
    Assume schema1 also creates a procedure (authid owner, the default) to insert data into the GTT and grants execute on the procedure to schema2
    If schema2 executes: insert into schema1.gtt, the data will appear in the temporary tablespace of schema2
    If schema2 executes: execute schema1.procedure, the data will appear in the temporary tablespace of schema1
    So if you want to protect the "normal" temporary tablespace, you could just create a special temporary tablespace for the owner of the procedure.
    Regards
    Jonathan Lewis

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

  • Script for temporary tablespace in 8.1.7.4.0

    Hi,
    I am working in oracle 8.1.7.4.0 and HP-UX os.I need a shell script which is to do the following tasks,
    1. create a new temporary tablespace
    2.assign the new temp tablespace to the database user level
    3.drop the old temp tablespace
    4. then create a temp tablespace with the old name
    5. then assign the new temp tablespace to the database user level
    6.drop the new temp tablespace
    Kindly provide me the script for oracle 8.1.7.4.0
    Rgds..

    here is one I prepared earlier (just like a TV chef)
    set echo on
    -- Create a New TEMP TEMP
    create temporary tablespace temp2
    tempfile 'dir/temp2.dbf' size 5M
    autoextend on next 1M maxsize unlimited extent management local uniform size 1M;
    -- Make the TEMP2 tablespace temp
    alter database default temporary tablespace temp2;
    -- Drop the orginal to recreate with new size
    drop tablespace temp including contents and datafiles;
    CREATE TEMPORARY TABLESPACE TEMP
    TEMPFILE 'dir/temp01.dbf' SIZE 100M AUTOEXTEND ON NEXT 100M MAXSIZE 30000M
    EXTENT MANAGEMENT LOCAL UNIFORM SIZE 2M;
    alter database default temporary tablespace temp;
    drop tablespace temp2 including contents and datafiles;

  • Error : Temporary Tablespace is Empty  when doing expdp/impdp

    Hi all,
    I was doing expdp on my oracle 10.1.0.2.0 DB on Win XP P, though the user is having a default temporary tablespace with a temp file on autoextend enabled, I got the message as...
    ORA-25153: Temporary Tablespace is Empty
    Then I created a new temporary tablespace for the user with 500M tempfile and autoextend enabled, then expdp went through.
    Now I am doing the impdp for the same .dmp file to generate one sqlfile for the DB,
    again I am facing the same error message as...
    ORA-25153: Temporary Tablespace is Empty
    ----- PL/SQL Call Stack -----
    object line object
    handle number name
    17FE07EC 13460 package body SYS.KUPW$WORKER
    17FE07EC 5810 package body SYS.KUPW$WORKER
    17FE07EC 3080 package body SYS.KUPW$WORKER
    17FE07EC 3530 package body SYS.KUPW$WORKER
    17FE07EC 6395 package body SYS.KUPW$WORKER
    17FE07EC 1208 package body SYS.KUPW$WORKER
    17ABE058 2 anonymous block
    Job "CHECKUP"."SYS_SQL_FILE_FULL_02" stopped due to fatal error at 10:09
    The message indicates that...
    ORA-25153: 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.
    SO my question is every time I do any imp exp have I to add temp file in my temporary tablespace? will it not be cleared on the completion of the job?
    Any advice please.

    Hi Sabdar,
    The result of the query is as...
    SQL> SELECT * FROM DATABASE_PROPERTIES where
    2 PROPERTY_NAME='DEFAULT_TEMP_TABLESPACE';
    PROPERTY_NAME
    PROPERTY_VALUE
    DESCRIPTION
    DEFAULT_TEMP_TABLESPACE
    TEMP
    Name of default temporary tablespace
    So the default temporary tablespace is TEMP which is not having any tempfile as I cloned this DB from the primary DB, but the user I am using for the impdp is 'checkup' and the temporary tablespace for 'checkup' is 'checkup_temp1' which s having tempfile.
    SO then why the impdp job is going to server's temporary tablespace instead of user's temporary tablespace.
    Is there any way to get whether 'checkup_temp1' tablespace is the default temporary tablespace for 'checkup' or not?
    Can I create create the user mentioning default temporary tablespace anyway because it is giving me error as...
    SQL> create user suman identified by suman
    2 default tablespace checkup_dflt
    3 default TEMPORARY TABLESPACE checkup_temp1;
    default TEMPORARY TABLESPACE checkup_temp1
    ERROR at line 3:
    ORA-00921: unexpected end of SQL command
    Then I did ...
    SQL> create user suman identified by suman
    2 default tablespace checkup_dflt
    3 TEMPORARY TABLESPACE checkup_temp1;
    User created.
    Regards

  • Temporary tablespace is not being used

    hello all,
    we have oracle 10g 10.2.1.0 on windows server 2003 platform (32-bit). we have 24*7 database. we have OLTP with heavy transactions. last night we ran a report which is supposed to fetch more than 2500 rows and query include group by and order by clause.
    i have rebuild all indexes on index tablespace, which were previously on users tablespace where my all data resides.
    but it is taking too much long to generate report more that 40 minutes (expected 5 minutes) my SGA is set to 1.2 GB shared pool sixe is 500M and db_cache_size=400M. and when i check tablespace status from enterprise manager everytime , i see that temporary tablespace is never being used..it always shows that temporary tablespace usages 0.0 and i allocated 4 GB to temp tablespace and it is also default temporary tablespace.
    what else i can do to force oracle to use temporary tablespaces??? it is not using for sorting also...thats why it is taking so long to generating report..
    any suggestion would be appreciable..
    thanks and regards
    VD

    vikrant dixit wrote:
    we have oracle 10g 10.2.1.0 on windows server 2003 platform (32-bit). we have 24*7 database. we have OLTP with heavy transactions. last night we ran a report which is supposed to fetch more than 2500 rows and query include group by and order by clause.
    i have rebuild all indexes on index tablespace, which were previously on users tablespace where my all data resides.
    but it is taking too much long to generate report more that 40 minutes (expected 5 minutes) Are you saying that you tried rebuilding all your indexes because the report started to run slowly, or conversely that you rebuilt all the indexes and then the report ran slowly ?
    If it's just a report that you could simply re-run, then all you have to do is re-run it and watch exactly where the time goes (you've been told about the 10046 trace already).
    If it's a report that ran, and was tuned, regularly in the past then you presumably have the execution plan stored somewhere so you could even check the current execution plan compared to the old one to see if it has changed.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.
    "There's no sense in being precise when you don't even know what you're talking about"
    John von Neumann                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Temporary tablespace in oracle 8i

    hi,
    i am working in oracle 8.1.7.4.0.i am creating a temporary tablespace.
    After creating the temp tablespace i am going to assign it as default temporary tablespace.
    alter database default temporary tablespace <tbs-name>;
    but its showing error...as
    ora-02231 - missing or invalid option to alter database,
    how to assign the default temporary tablespace in this oracle version.
    Rgds...

    You can not set the temporary tablespace at the database level as default temporary tablespace in Oracle 8i. From Oracle 9i onwards, you can create and assign the temporary tablespace at the database level.
    Only possible way in Oracle 8i is at the user level.
    i.e.
    SQL> alter user scott default tablespace TEMP;
    HTH.
    Regards,
    Sabdar Syed.

  • Help!!! Temporary tablespace issue

    Hi,
    10g
    I had 2 tablespaces temp1 and temp2
    temp1 was created as a normal tablespace as temporary.
    temp2 was created as a temporary tablespace.
    I queried and found out that the temporary tablespace for all the users are temp1(including system)
    and hence I saw the error ORA-25153: Temporary Tablespace is Empty
    So what I did is I drop the tablespace temp1 and tried assigning the users to temp2.
    I am getting error
    Now I am not able to create anything the database.
    Please see below example
    SQL> drop user test;
    User dropped.
    SQL> create user test identified by test;
    create user test identified by test
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-00959: tablespace 'TEMP1' does not exist
    I did a restart of database but still the users are assigned to temp1 which is not there
    Please help !!!!!!!!!!!!!!!!!!

    PROPERTY_NAME
    PROPERTY_VALUE
    DESCRIPTION
    DEFAULT_TEMP_TABLESPACE
    TEMP2
    Name of default temporary tablespace
    SQL> SQL>
    PROPERTY_NAME
    PROPERTY_VALUE
    DESCRIPTION
    DEFAULT_TEMP_TABLESPACE
    TEMP2
    Name of default temporary tablespace
    ====================================================
    SQL> SQL>
    TABLESPACE_NAME
    FILE_NAME
    BYTES/1024/1024 MAXBYTES/1024/1024 AUT
    TEMP2
    /db08/oracle/bricry1/TEMP02.DBF
    500 0 NO
    TEMP2
    /db08/oracle/bricry1/TEMP02_2.DBF
    500 0 NO
    TABLESPACE_NAME
    FILE_NAME
    BYTES/1024/1024 MAXBYTES/1024/1024 AUT
    TIVOLIORTEMPTS
    /db08/oracle/bricry1/tivoliortempts_01.dbf
    25 0 NO
    =========================================
    SQL> SQL>
    TEMPORARY_TABLESPACE
    TIVOLIORTEMPTS
    TEMP2
    TEMP1
    SQL> SQL>
    SQL>

  • Temporary tablespace questions

    I have an Oracle 9.2.0.1.0 database running on a Windows 2000 server. I'm encountering several problems with its temporary tablespace. Here is how the temporary tablespace is created:
    create database testdb
    datafile 'd:\oradb\testdb\datafiles\testdbsys1.dbf'
    size 200M AUTOEXTEND ON NEXT 10M
    default temporary tablespace temporary
    tempfile 'd:\oradb\testdb\datafiles\tmp1.dbf'
    size 16400K reuse autoextend on next 16400K
    undo tablespace undotbs
    datafile 'd:\oradb\testdb\datafiles\testdbrbs1.dbf'
    size 100M reuse autoextend on next 10M maxsize unlimited;
    Questions:
    1- Despite the fact that the temporary tablespace datafile is specified "autoextend on", it autoextends up to 4 Gb then it fails. The exact error is ORA-0652: unable to extend temp segment by 64 in tablespace TEMPORARY. If I manually extend it beyond 4 Gb, everything works fine. Is this a bug or is it something I do wrong ? If so, what should I do to correct this ?
    2- I can't figure out what statement of my application makes the temporary tablespace grow so big. I looked at all the trace files in UDUMP and I noticed it's always the same statement that is logged when the "autoextend" error occurs. But when I run the statement on its own in SQLPlus, nothing special happens to the temporary tablespace. What is the best way to track what statement uses what resources of the temporary tablespace ?
    3- I don't know if this is what happens, but it looks like space isn't reused in the temporary tablespace. Is this possible ? If so, how can I tell Oracle to reuse it ?
    Thanks.

    1-You can try to modify the maxsize for datafaile to UNLIMITED. I am not sure it shall work, but it's worth a try
    2-Probably it's a statement that uses an order by on a large result set
    3-You can try to force the wakeup of SMON process that would free the unused extents of temporary tablespace.
    Try http://www.ixora.com.au/tips/admin/stray_temp.htm
    There is also a script to force the wakeup of smon

  • 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

Maybe you are looking for

  • Oracle FOD Storefront demo install problem

    I"m using Jdev Studio V 11.1.1.4.0 and I downloaded PS3 (build 5923) demo version. Firstly, do I have the right demo version for my Jdev? Second, I am not able to install this. My build.properties looks like this: # Master Ant properties file for Fus

  • Is it possible to move content between private and public sites after publishing the latter?

    Hi. Is anyone else in this position? My institution kept its original iTunes U site after migrating our public content to the new public site last year. We now have separate public and private (university log-in only) sites and must maintain both. Th

  • Add filename and path into PDF-form

    Hello, I create different PDF-forms for our company with LiveCycle Designer 8.2.1 . Now I have to integrate the name of the form-file and its path automatically into the form. My idea is to place a text-field, I will give the type "calculated" in the

  • Registry Directory Not Available error

    I am unable to open install new software and update software in my standalone version of Adobe Coldfusion designer 2.0.1 If I go to Help / Product Details / Installation Details I get a message that An internal Error occurred Fetching Children of _Se

  • Performance issue with JEST table

    Moved to correct forum by moderator Hi all, I have a report which is giving performance issue. It hits the function module "status_read", which in turn hits the table JEST.. The select query is: SELECT SINGLE * FROM JSTO CLIENT SPECIFIED WHERE MANDT