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.

Similar Messages

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

  • Drop a temporary tablespace

    Hi all
    I have created a temporary tablespace temp01 and assign it as the default temporary tablespace for the database (10.0.2.0)
    How can I drop it without changing the default temporary tablespace?
    thanks for help

    phaeus wrote:
    Hello,
    create a new temporary tablespace. Make it to your default database temp tablespace and then you can drop the old one.
    A couple of thoughts I'd want to check on that - based on memories of problems in the dim and distant past.
    If you take this approach, do you still have to worry about users who have already got the dropped tablespace associated with their temp tablespace in dba_users ? Memory says they'll either get an error message, or they'll fall back to SYSTEM despite there being a new default.
    One of the reasons for creating tablespace groups for temporary tablespaces is that you can assign a tablespace group to a user, and then invisibly create and drop temporary tablespaces in that group without having to adjust the users' details. But there used to be a bug that resulted in excessive hits on dc_tablespaces if you did this, and extreme numbers of executions of a query against ts$ (or maybe file$).
    Regards
    Jonathan Lewis

  • When can I safely drop a temporary tablespace?

    I have a temporary tablespace in my database that I would like to get ride of.
    It was created with a statement similar to this:
    CREATE TEMPORARY TABLESPACE "TEMP"
    blah blah blah. . .
    I have checked dba_users and dba_extents. It is not used in either places.
    Is there anywhere else I should check prior to executing a "DROP TABLESPACE" command?
    Thank you,
    -Kris

    Query V$SORT_SEGMENT to check CURRENT_USERS for that TABLESPACE_NAME.
    If CURRENT_USERS is 0, it is not in use currently.
    Of course, query DBA_USERS to check TEMPORARY_TABLESPACE to see if it has been defined as the Temporary Tablespace for any user.
    If you have only created a Temporary Tablespace but not assigned it as the DEFAULT TEMPORARY TABLESPACE at the Database level or any user's Temporary Tablespace with an ALTER USER command, then it wouldn't be in use !
    Oracle starts using a Temporary Tablespace if either
    a. It is the DEFAULT TEMPORARY TABLESPACE
    b. It has been assigned as a User's Temporary Tablespace
    c. It is part of a Temporary Tablespace Group that has been assigned
    Hemant K Chitale
    http://hemantoracledba.blogspot.com

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

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

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

  • ORA-00600 Error, when Dropping one temporary tablespace

    Hi,
    I am using Oracle 10.1.0.2.0 on WinXPP, after I created a new temp tablespace and assigned one user to it as its temp tablespace, then trying to drop the old temp tablespace , I am getting the following Error . Can anybody pl. explain the reason.
    Steps I followed as...
    SYSTEM@orcl>create temporary tablespace checkup_tmp tempfile 'c:\ORACLE\PRODUCT\10.1.0\ORADATA\ORCL \CHECKUP_Tmp.dat' size 500M;
    Tablespace created.
    SYSTEM@orcl> alter user checkup temporary tablespace checkup_tmp;
    User altered.
    SYSTEM@orcl> drop tablespace CHECKUP_TEMP including contents;
    drop tablespace CHECKUP_TEMP including contents
    ERROR at line 1:
    ORA-00600: internal error code, arguments: [krf_gen_drop_tablespace-1], [], [],
    SYSTEM@orcl> drop tablespace CHECKUP_TEMP ;
    drop tablespace CHECKUP_TEMP
    ERROR at line 1:
    ORA-00600: internal error code, arguments: [krf_gen_drop_tablespace-1], [], [],
    Thanks in advance

    this is the bug 3984486
    consider upgrading.
    the workaround seems to flashback the DB...

  • Drop Temporary Tablespace!

    Hi All,
    I have tried dropping my old temporary tablespace TEMP after making new TEMP2 as default.
    All the users (checked in dba_users) are using TEMP2 as default temporary tablespace.
    Now, issue is when I am trying to take TEMP offline and dropping it some of the users are not able to open the forms.
    Please suggest, is it necessary that I must do this activity after taking a proper downtime or I can do it in business hours.
    Thanks,
    Anchorage

    It's done now!!!
    Actually issue was
    You cannot drop a tablespace if it contains any rollback segments holding active transactions.*
    Try to check whether any one using the temp segments or not on query "v$sort_usage"*
    If it returns the rows, the sessions are using the temp tablespace. Once the Sessions Closes then the the command execution will be completed, else you and go head and kill the session with respect to session Id.*
    Which was been explained to me by Pavan in General Database Forum!
    I have killed the active session and it was success!
    Anchorage

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

  • 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에서, 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