oracle学习笔记:重建临时表空间

重建临时表空间

 

1、创建中转临时表空间

create temporary tablespace TEMP1 tempfile '/oradata/HXDB/datafile/temp02.dbf' size 256M reuse autoextend on next 16M maxsize 1024M;

 

2、修改缺省临时表空间

alter database default temporary tablespace temp1;

 

3、删除原来临时表空间

drop tablespace temp including contents and datafiles;

 

4、重建临时表空间

create temporary tablespace TEMP tempfile '/oradata/HXDB/datafile/temp01.dbf' size 256M reuse autoextend on next 16M maxsize 1024M;

 

5、修改缺省临时表空间

alter database default temporary tablespace temp;

 

6、删除中转用临时表空间

drop tablespace temp1 including contents and datafiles;

注意:执行该条语句时数据库会一直处于等待中,原因是这个会话仍然在使用temp1表空间,解决办法是退出该会话,重新登录并删除。

posted @ 2019-11-25 10:53  清净心境  阅读(1350)  评论(0编辑  收藏  举报