ITPub博客

首页 > 数据库 > Oracle > 【实验】重建临时表空间解决临时表空间过大问题

【实验】重建临时表空间解决临时表空间过大问题

原创 Oracle 作者:OCMU联盟 时间:2009-06-25 18:09:43 0 删除 编辑
今天在测试库中创建大表索引后临时表空间自动扩展到了10G,我采用了重建临时表空间的方式处理了一下,记录如下:

1.创建中转临时表空间

create temporary tablespace temp1 tempfile '/oracle/oradata/secooler/temp02.dbf' size 512m reuse autoextend on next 1m maxsize unlimited;

2.改变缺省临时表空间为刚刚创建的新临时表空间temp1
alter database default temporary tablespace temp1;

3.删除原临时表空间
drop tablespace temp including contents and datafiles;

4.重建临时表空间
create temporary tablespace temp tempfile '/oracle/oradata/secooler/temp01.dbf' size 512m reuse autoextend on next 1m maxsize unlimited;

5.重置缺省临时表空间为新建的temp表空间
alter database default temporary tablespace temp;

6.删除中转用临时表空间
drop tablespace temp1 including contents and datafiles;

OK,搞定!

BTW:
另外还有一种修改临时表空间大小的方法,详见《【实验】RESIZE方法解决临时表空间过大问题》
http://space.itpub.net/?uid-519536-action-viewspace-itemid-610138

-- The End --

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/70034820/viewspace-2993742/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
OCM联盟( Oracle Certified Master Union)是由侯圣文(ACE总监)发起的一个公益组织,旨在为每一个OCM大师提供一个可以继续展示自己才华,技术和实力的平台。

注册时间:2007-05-27

  • 博文量
    799
  • 访问量
    8407013