首页 » ORACLE 9i-23c » ORA-01652: unable to extend temp segment by 8192 in tablespace

ORA-01652: unable to extend temp segment by 8192 in tablespace

今天发现了这个问题,分析记录一下问题是这样子的,有一个表记录7亿,要在表上建索引,临时表空间已分配32G,DB DEFAULT BLOCK SIZE 8K,建索引时报了这个错误

ORA-01652: unable to extend temp segment by 8192 in tablespace INDEXSPACE03

看到这个问题很容易判断是disk space不足,或是tablespace space 不足

很好奇这么大的表在没索引前查询该有多久

不光create index or rebuild,alter table move,select /*+oreder */,group order 等内存不足都会用到临时表空间,这个案例是用户所用临时表空间是一个32G的文件,如果你还想再增加或开启datafile无限扩展来解决这个问题,对不起上面有提到block size 8K,那样你只会撞见ora-01144(下篇再说这个)

可以通过dba_temp_files查看当前临时表空间大小

监控临时段信息可以使用v$sort_segment and v$sort_usage

查询使用或剩余空间在dba_free_space是不是记录临时表空间的,可以使用v$temp_space_header代替

解决方法是再增加临时表空间数量或使用临时表空间组达到增加临时表空间大小的目的。

打赏

目前这篇文章有2条评论(Rss)评论关闭。

  1. Preston Dummett | #1
    2011-12-21 at 04:49

    Important contribution here, but sometimes I can to my side with me in his apartment and found the same book. I love visiting my holiday home and see you soon for me.

  2. Amelia Shotebenada | #2
    2011-12-16 at 09:55

    2498 Connected in 82 189 ms