rebuild online索引遇到ora-1450
測試一下
SQL> create table justin(name varchar2(4000));
Table created
SQL> create index idx_justin_name on justin(name);
Index created
SQL> alter index idx_justin_name rebuild online;
alter index idx_justin_name rebuild online
ORA-00604: error occurred at recursive SQL level 1
ORA-01450: maximum key length (3215) exceeded
SQL> alter index idx_justin_name rebuild;
Index altered
去除online即可重建成功;
系統預設塊為8k,現在建立一個16k的表空間;
SQL> show parameter db_block
NAME TYPE VALUE
------------------------------------ -------------------------------- ------------------------------
db_block_buffers integer 0
db_block_checking string FALSE
db_block_checksum string TRUE
db_block_size integer 8192
SQL> show parameter db_16k_cache_size;
NAME TYPE VALUE
------------------------------------ -------------------------------- ------------------------------
db_16k_cache_size big integer 0
SQL> alter system set db_16k_cache_size=1m;
System altered.
SQL> create tablespace justin datafile '/data/oracle/oradata/justin/justin.dbf' size 10m blocksize 16k;
Tablespace created.
重新rebuild online一下
SQL> alter index idx_justin_name rebuild online tablespace justin;
alter index idx_justin_name rebuild online tablespace justin
ORA-00604: error occurred at recursive SQL level 1
ORA-01450: maximum key length (3800) exceeded
依舊不行,但是錯誤資訊的max key length從3215上升到3800;
SQL> drop tablespace justin;
Tablespace dropped.
SQL> alter system set db_32k_cache_size=32k;
System altered.
SQL> create tablespace justin datafile '/data/oracle/oradata/justin/justin.dbf' size 10m blocksize 32k;
Tablespace created.
SQL> alter index idx_justin_name rebuild online tablespace justin;
alter index idx_justin_name rebuild online tablespace justin
ORA-00604: error occurred at recursive SQL level 1
ORA-01450: maximum key length (3800) exceeded
使用塊大小為32k和16k的表空間,均是報告3800為上限,依據提示將索引列的長度調小為3780,這次在32k表空間裡可以建立成功,但是在其他8k表空間依舊不行
SQL> alter table justin modify name varchar2(3780);
Table altered
SQL> alter index idx_justin_name rebuild online tablespace justin;
Index altered
SQL> alter index idx_justin_name rebuild online;
Index altered
SQL> alter index idx_justin_name rebuild online tablespace justin;
alter index idx_justin_name rebuild online tablespace purchase
ORA-00604: error occurred at recursive SQL level 1
ORA-01450: maximum key length (3215) exceeded
檢視metalink ID 236329.1,
Rebuild the index without ONLINE clause. There is no way to rebuild this index
ONLINE without the change of the initialization parameter db_block_size.
OR
Rebuild the database with greater value of the initialization parameter
db_block_size according to Note:136158.1:
ORA-01450 and Maximum Key Length - How it is Calculated.
以後遇到此類錯誤,
要麼去掉online選項,要麼建立blocksize更大的表空間;但是後者並不能保證一定可以rebulid online透過
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15480802/viewspace-705231/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 聊聊索引Index Rebuild和Rebuild Online(下)索引IndexRebuild
- 索引rebuild和rebuild online時要慎重索引Rebuild
- 聊聊索引Index Rebuild和Rebuild Online(上)索引IndexRebuild
- 索引rebuild和rebuild online時要慎重(轉載)索引Rebuild
- ORA-08104 索引online rebuild索引Rebuild
- 索引rebuild online失敗後處理索引Rebuild
- alter index rebuild 與 rebuild onlineIndexRebuild
- rebuild與rebuild online效率比對Rebuild
- Index Online RebuildIndexRebuild
- oracle10g_alter index rebuild_online_重構索引OracleIndexRebuild索引
- alter index rebuild和rebuild online的區別IndexRebuild
- "Alter index rebuild online parallel n"會修改索引的degree屬性IndexRebuildParallel索引
- create index online 與rebuild index onlineIndexRebuild
- create index online 與rebuild index onlineIndexRebuild
- MSSQL Rebuild(重建)索引SQLRebuild索引
- index rebuild online的問題IndexRebuild
- 重建索引index rebuild online vs offline vs index coalesce vs index shrik space索引IndexRebuild
- 【羅玄】從鎖的角度看rebuild index online和rebuild indexRebuildIndex
- alter index ind1 rebuild 和alter index ind1 rebuild onlineIndexRebuild
- 選出需要rebuild的索引Rebuild索引
- alter index rebuild online引發的血案IndexRebuild
- 測試index online rebuild故障記錄IndexRebuild
- alter index ... rebuild online的機制(zt)IndexRebuild
- “rebuild index online hang住" 問題解析RebuildIndex
- rebuild index online和create index online及沒有online的區別RebuildIndex
- oracle索引分類rebuild案例集Oracle索引Rebuild
- 索引是如何定期rebuild的(zt)索引Rebuild
- rebuild index online的鎖機制淺析RebuildIndex
- Online rebuild index遭遇ORA-08104RebuildIndex
- rebuild分割槽表分割槽索引的方法Rebuild索引
- 檢查是否存在truncate或者rebuild的索引Rebuild索引
- 關於索引是否該rebuild的問題索引Rebuild
- 加快建立索引(create / rebuild index) 的幾點索引RebuildIndex
- (轉)Index Rebuild Online 過程(9i)完整版IndexRebuild
- 關於rebuild index online 及drop index後重建問題RebuildIndex
- create index , rebuild index troubleshooting 索引故障解決IndexRebuild索引
- best practice of rebuild your partition table local index online by using: "update indexes"RebuildIndex
- 轉個分割槽表Local索引Rebuild的總結索引Rebuild