Online rebuild index遭遇ORA-08104
在online rebuild index的過程中,如果中途異常終止(比如按ctrl+c強行退出),運氣不好的話,可能會遇到問題,在你想重新rebuild index(或者drop,analyze)的時候,報錯:
這是由於在異常終止online rebuild操作的時候,oracle沒來得及清理相應的臨時段和標誌位,系統認為online rebuild操作還在進行造成的。在Oracle10g之前,對於這種情況沒有太好的辦法,只有等SMON程式來進行清理了。網上有說上重啟可以解決,有說直接update系統表ind$的,對於不能停機的產品庫來說,這些都是不可取的方案。重啟不現實,修改系統表更是DBA的大忌。Oracle10g則可以使用dbms_repair.online_index_clean手工清理(metalink的說法,9i打了Bug 3805539的patch的話也能用過程了)。所以,對於大索引的online rebuild,不要輕易中止。否則可能要等上相當一段時間SMON才能完成清理工作,清理完後,可以在alert.log中看到如下記錄:
異常終止的情況下,可以發現ind$關於該索引的狀態還是online rebuild的:
OBJ# FLAGS
---------- ----------
67420 514
Flag欄位的說明可以在ind$的sql.bsq指令碼中找到:
/* unusable (dls) : 0x01 */
/* analyzed : 0x02 */
/* no logging : 0x04 */
/* index is currently being built : 0x08 */
/* index creation was incomplete : 0x10 */
/* key compression enabled : 0x20 */
/* user-specified stats : 0x40 */
/* secondary index on IOT : 0x80 */
/* index is being online built : 0x100 */
/* index is being online rebuilt : 0x200 */
/* index is disabled : 0x400 */
/* global stats : 0x800 */
/* fake index(internal) : 0x1000 */
/* index on UROWID column(s) : 0x2000 */
/* index with large key : 0x4000 */
/* move partitioned rows in base table : 0x8000 */
/* index usage monitoring enabled : 0x10000 */
514=0×202,表示該索引狀態為index is being online rebuilt : 0×200 + analyzed : 0×02
在SMON完成清理動作後,再次查詢索引狀態已經恢復正常:
OBJ# FLAGS
---------- ----------
67420 2
相關參考:
Note:351585.1
Bug 4364202
Bug 3805539
Bug 2702410
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7490392/viewspace-1024361/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Index Online RebuildIndexRebuild
- alter index rebuild 與 rebuild onlineIndexRebuild
- ORA-08104 索引online rebuild索引Rebuild
- create index online 與rebuild index onlineIndexRebuild
- create index online 與rebuild index onlineIndexRebuild
- 聊聊索引Index Rebuild和Rebuild Online(下)索引IndexRebuild
- 聊聊索引Index Rebuild和Rebuild Online(上)索引IndexRebuild
- alter index rebuild和rebuild online的區別IndexRebuild
- 【羅玄】從鎖的角度看rebuild index online和rebuild indexRebuildIndex
- index rebuild online的問題IndexRebuild
- alter index ind1 rebuild 和alter index ind1 rebuild onlineIndexRebuild
- rebuild index online和create index online及沒有online的區別RebuildIndex
- alter index rebuild online引發的血案IndexRebuild
- 測試index online rebuild故障記錄IndexRebuild
- alter index ... rebuild online的機制(zt)IndexRebuild
- “rebuild index online hang住" 問題解析RebuildIndex
- rebuild online被終止後的錯誤 ora-08104Rebuild
- 關於rebuild index online 及drop index後重建問題RebuildIndex
- rebuild index online的鎖機制淺析RebuildIndex
- 重建索引index rebuild online vs offline vs index coalesce vs index shrik space索引IndexRebuild
- rebuild indexRebuildIndex
- index rebuildIndexRebuild
- ORA-08104: this index object 93996 is being online built or rebuiltIndexObject996UI
- online rebulid index異常終止遇到ora-08104Index
- oracle10g_alter index rebuild_online_重構索引OracleIndexRebuild索引
- (轉)Index Rebuild Online 過程(9i)完整版IndexRebuild
- rebuild index 排序RebuildIndex排序
- sybase rebuild indexRebuildIndex
- rebuild與rebuild online效率比對Rebuild
- ORA-08104: this index object %s is being online built or rebuilt的處理IndexObjectUI
- "Alter index rebuild online parallel n"會修改索引的degree屬性IndexRebuildParallel索引
- best practice of rebuild your partition table local index online by using: "update indexes"RebuildIndex
- Index rebuild --case 1IndexRebuild
- 索引rebuild和rebuild online時要慎重索引Rebuild
- alter index rebuild與index_statsIndexRebuild
- ORACLE中index的rebuildOracleIndexRebuild
- 索引rebuild和rebuild online時要慎重(轉載)索引Rebuild
- Oracle alter index rebuild 說明OracleIndexRebuild