三月 5th, 2012

ORALCE 数据库如何清除临时表空间

数据库问题解决方案, by 小哥.

1.设置db_create_file_dest参数(oracle

OMF管理存储文件的路径)
alter system set db_create_file_dest=’/opt/oracle/oradata/orcl’;(本人数据库数据文件存储路径);2.创建一个新的临时表空间
create temporary tablespace temp2;
此时新的临时表空间已经创建,数据文件存在/opt/oracle/oradata/orcl中,名称系统取的,表空间参数
是采用系统默认的参数;
3.设置默认的临时表空间
alter database default temporary tablespace temp2;

4.删除以前的默认临时表空间(就是数据量很大的那个临时表空间)
drop tablespace temp including contents and datafiles;

5.在创建一个新的临时表空,名称很上面删除的一样
create temporary tablespace temp;

6.设置默认表空间
alter database default temporary tablespace temp;

7删除开始新建的表空间
drop tablespace temp2;
因为是OMF方式创建的表空间,在删除时不用带including contents and datafiles 参数

Back Top