环境:

OS:

Oracle Linux Server release 5.7

DB:

Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

1、查看临时表空间信息:

select tablespace_name,file_name,bytes/1024/1024 file_size,autoextensible from dba_temp_files;

TABLESPACE FILE_NAME FILE_SIZE AUTOEXTEN
---------- ---------------------------------------- ---------- ---------
TEMP /u01/oracle/oradata/yoon/temp01.dbf 29 YES

2、添加数据文件,tempfile,not datafile

SQL> alter tablespace temp add tempfile '/u01/oracle/oradata/yoon/temp02.dbf' size 100m;

3、创建临时表空间

SQL> create temporary tablespace temp2 tempfile '/u01/oracle/oradata/yoon/temp2_01.dbf' size 100m autoextend on next 50m;

4、删除临时表空间

SQL> drop tablespace temp2 including contents and datafiles;

5、修改默认临时表空间

SQL> alter database default temporary tablespace temp2;

6、修改用户默认临时表空间

SQL> alter user scott temporary tablespace temp;

04-14 07:16