oracle 临时表空间

来源:互联网 发布:玩具机械战警如何编程 编辑:程序博客网 时间:2024/06/05 06:21

环境:

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/1024file_size,autoextensible from dba_temp_files;

 

TABLESPACEFILE_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 onnext 50m;

 

4、删除临时表空间

SQL> drop tablespace temp2 including contents anddatafiles;

 

5、修改默认临时表空间

SQL> alter database default temporary tablespace temp2;

 

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

SQL> alter user scott temporary tablespace temp;

 

 

 

 

0 0