早上刚开QQ,群里的一朋友就说rebuild index 报ORA-01652错误。并且temporary tablespace 是足够大的。 rebuild 索引是6G,indextablespace 剩余空间是2G。让朋友把index tablespace 空间增加10G,在rebuild index成功。
之前整理过的一篇有关rebuildindex 的文章:
Oracle alter index rebuild 说明
http://blog.csdn.net/tianlesoftware/article/details/6538928
关于这个问题MOS 上有2篇文档进行了相关的说明:[ID 94178.1] 和 [ID 120360.1]。
执行如下命令时:
ALTER INDEX REBUILD or
ALTER TABLE MODIFY PARTITION REBUILD LOCALINDEXES
可能会遇到ORA-01652的错误, 该错误详细解释如下:
ORA-01652:unable to extend temp segment by %s in tablespace %s
Cause: Failed to allocate an extent for temp segmentin tablespace.
Action:Use ALTER TABLESPACE ADD DATAFILE statement to add one or more files to thetablespace indicated or create the object in other tablespace.
解决方法:
You will have to increase the amount of available free space in the index tablespaceeither by adding another datafile or enabling autoextend on an existingdatafile.
--增加索引表空间添加数据文件或者将数据文件改成autoextend。
解释:
Thetablespace in the error message is pointing to the index's tablespace insteadof the user's default temporary tablespace.
During an index rebuild, there are two types oftemporary segments involved.
First, there are the temporarysegments that are used to store partial sort data when the SORT_AREA_SIZE istoo small to process the complete sort set. These segments are built in theuser's default TEMPORARY tablespace.
Second, as the index is being rebuilt, it uses a segment which is defined as atemporary segment until the rebuild is complete. Once this segment is fully populated,the old index can be dropped and this temporary
segment is redefined as apermanent segment with the index name.
--在索引rebuild 期间,会产生2种temporary segments。
第一种是用来排序的temporarysegments,当SORT_AREA_SIZE 的值太小时,该segments 会在用户默认的temporary tablespace 空间分配。
第二种是在用户索引空间的segments,在rebuild index时,会分配一个temporary segment 来保存索引的信息,当rebuild 结束之后,old index 被droped 掉,之前分配的temporary segments 会定义为permanent segment。
所以对索引进行rebuild 至少要提供1倍以上的空闲空间来存放temporary segment。 否则就会出现ORA-01652的错误。
The error you are seeing is probably due to there being insufficient room in theindex's tablespace to hold both the original index and the new version concurrently.The new version of the index, currently a temp segment, will be in thetablespace
where the index is required.
As an index is being rebuilt, it uses a segment which is defined as a temporarysegment for the rebuild. Once this segment is fully populated, the allocationof the old index is set to temporary and the populated temporary segment isredefined
as a permanent segment with the index name.
Now if the storage clause (next extent for example) for the existing index is setto a very high number (64MB or so) and you don't specify a storage clause withthe rebuild command Oracle will use the storage clause of the existing index toallocate
the space for the temporary segments.
This will allocate a lot of (unneeded) space and so you will run into the ora-1652.
可以检查索引storageclause的配置,看这些值是否合适。
/* Formatted on 2011/8/3 12:27:36(QP5 v5.163.1008.3004) */
SELECT OWNER,
INDEX_NAME,
TABLESPACE_NAME,
INITIAL_EXTENT,
NEXT_EXTENT,
MIN_EXTENTS,
MAX_EXTENTS,
PCT_INCREASE
FROM dba_indexes;
-------------------------------------------------------------------------------------------------------
Blog: http://blog.csdn.net/tianlesoftware
Weibo: http://weibo.com/tianlesoftware
Email: dvd.dba@gmail.com
DBA1 群:62697716(满); DBA2 群:62697977(满)DBA3 群:62697850(满)
DBA 超级群:63306533(满); DBA4 群: 83829929(满)DBA5群: 142216823(满)
DBA6 群:158654907(满) 聊天 群:40132017(满) 聊天2群:69087192(满)
--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请
分享到:
相关推荐
X64安装Adobeair必备 rebuild_db-1.0-rc1.zip
开始使用 REBUILD 非常简单,不需要配置复杂的运行环境,零依赖快速部署,超简单! 1. 使用已发布版本 生产环境强烈推荐使用此方式 !!! 首先 下载 安装包,我们同时提供 standalone 与 boot 两种安装包。...
rebuild_CRM_ERP_库存运输生产系统
REBUILD 通过创新的业务流程引擎帮助你快速搭建各类企业管理系统,全图形化配置无需了解技术。 REBUILD 侧重于业务需求实现,而非基础技术框架或项目启动模板,通过 REBUILD 可以真正实现零代码快速搭建!无需编程...
index rebuild
Ajax-rebuild-js-function.zip,使用javascript,ajax代表异步javascript和xml。它是多种web技术的集合,包括html、css、json、xml和javascript。它用于创建动态网页,其中网页的小部分在不重新加载网页的情况下更改。
快速重建索引的一种有效的办法,因为使用现有索引项来重建新索引,如果客户操作时有其他用户在对这个表操作,尽量使用带online参数来最大限度的减少索引重建时将会出现的任何加锁问题,alter index index_name ...
使用--save-dev安装软件包: npm install --save-dev electron-rebuild 然后,每当您安装新的npm软件包时,请重新运行electron-rebuild: $( npm bin ) /electron-rebuild 或者,如果您使用的是Windows: ....
docker-base-image-auto-rebuild-on-dependency更新如果(poetry.lock)中定义的python依赖关系已更新,则此操作将构建新的docker基本映像。 它的主要灵感来自于。 我将此包用于我们Github组织的容器注册表。输入项...
前端技术: ... CSS :用于设计网页外观和样式的样式表语言。 JavaScript:用于在网页上实现交互性和动态效果的脚本语言。 React:一个流行的JavaScript库,用于构建用户界面。 Angular:一个用于构建Web应用的前端框架...
高度可配置化的企业管理系统!企业内部可免费使用!低代码/零代码快速搭建企业中台、CRM客户关系管理、WMS库存管理、TMS运输管理、SCM供应链管理,外贸管理,甚至是 ERP 企业资源计划!
我们知道如何按照三种深度优先次序来周游一棵二叉树,来得到中根序列、前根序列和后根序列。反过来,如果给定二叉树的中根序列和后根序列,或者给定中根序列和前根序列,可以重建一二叉树。本题输入一棵二叉树的中根...
朋友有一个Rebuild Index的Job执行一般停掉了,问我是否可以查看哪些Index已经被Rebuild过了。本来以为Sys.index或者Sys.objects会存储类似的信息,结果没有找到。 从网上查了一下,SQL Server没有存储类似的信息...
Useful SQL commands or scripts to alter Oracle table used for SAP
rebuild-master
tools for mapplestory files and map decompress
自适应对象检测的Rebuild_Strong-Weak-Distribution-Alignment 这是个人论文的重建<用于自适应对象检测的强弱分布对齐>
"# plazma-burst-2-website-css-rebuild" 根据: 整出来的css,使用方法在html文件里按顺序引入fix.css和pb.css就可以用了 index.html为demo,可以在里面看看样式咋用,一般是给div添加pb-XXXX的类就起作用了 来自 超...
This script is used to rebuild the Linux 32-bit cross-toolchain that allows you to generate 32-bit binaries that target Ubuntu 8.04.