temporary tablespace的重建

网友投稿 294 2022-08-24

temporary tablespace的重建

temporary tablespace是oracle里临时表空间,临时表空间主要用途是在数据库进行排序运算、管理索引、访问视图等操作时提供临时的运算空间,当运算完成之后系统会自动清理。当oracle里需要用到sort的时候,而pga又没有足够大的时候,将会把数据放入临时表空间里进行排序,同时如果有异常情况的话,也会被放入临时表空间,但是我们需要重建temporary tablespace,直接是不能drop默认的临时表空间的,不过我们可以通过以下方法来做。

查看目前的temporary tablespaceSQL> select name from v$tempfile;

NAME———————————————————————/opt/oracle/oradata/conner/temp02.dbf/opt/oracle/oradata/conner/temp03.dbf

SQL> select username,temporary_tablespace from dba_users;USERNAME TEMPORARY_TABLESPACE—————————— ——————————SYS TEMPSYSTEM TEMPTEST TEMP

新建temporarySQL>create temporary tablespace temp2 datafile ‘/opt/oracle/oradata/ORCL/temp02.dbf’ size 50M autoextend on next 10M maxsize unlimited

切换默认temporary tablespaceSQL>alter database default temporary tablespace temp2;

SQL> select username,temporary_tablespace from dba_users;USERNAME TEMPORARY_TABLESPACE—————————— ——————————SYS TEMP2SYSTEM TEMP2TEST TEMP2

drop掉以前的temporary tablespaceSQL>drop tablespace temp2 including contents and datafiles;

===============================================================

Inthirties关注Oracle数据库 维护,优化,安全,备份,恢复,迁移,故障处理

QQ群:  85837884(注明:数据库)

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:常见4种营销模式你知道吗?(16种营销模式)
下一篇:RHEL4As RAC(OCFS2+ASM)手记
相关文章

 发表评论

暂时没有评论,来抢沙发吧~