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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- MSSQL Rebuild(重建)索引SQLRebuild索引
- Rebuild TreeRebuild
- MySQL 5.7使用pt-online-schema-change對大表加索引MySql索引
- flutter中的rebuild一些理解FlutterRebuild
- Online Book Repository
- create index .. onlineIndex
- ERR: node-gyp rebuild No Xcode or CLT version detectedRebuildXCode
- Exchange Online Mailbox RestorationAIREST
- Office Online Server概述Server
- [BUUCTF 2018]Online Tool
- Online Shopping App RequirementsAPPUIREM
- The 2024 CCPC Online Contest
- flutter防止widget rebuild終極解決辦法FlutterRebuild
- Waiting for target device to come onlineAIdev
- [LeetCode] 911. Online ElectionLeetCode
- MySQL Online DDL詳解MySql
- DROP AND RECREATE ONLINE REDOLOG FILES
- The online basketball universe is being redesigned
- Keil中translate,build和rebuild有什麼區別Rebuild
- MongoDB系列--輕鬆應對面試中遇到的MongonDB索引(index)問題MongoDB面試索引Index
- 我以為我對索引非常瞭解,直到我遇到了阿里面試官...索引阿里面試
- node與python版本不匹配報錯:node-gyp rebuildPythonRebuild
- mysql之 openark-kit online ddlMySql
- MySQL & MariaDB Online DDL 參考指南MySql
- 2024 ICPC Online 第二場(K)
- How to Convert Class File to Java File Online?Java
- Flink CDC Meetup · Online,5.21 開講!
- 我以為我對Mysql索引很瞭解,直到我遇到了阿里的面試官MySql索引阿里面試
- PostgreSQL 原始碼解讀(237)- 後臺程式#15(rebuild_database_list)SQL原始碼RebuildDatabase
- 記一次排查Flutter中預期外rebuild的過程FlutterRebuild
- Linux SOCKET介紹 www.weiboke.onlineLinux
- SharePoint Online 自定義Modern UI表單UI
- Online Judge——1000.A+B Problem(c++)C++
- [ABC221D] Online games 題解GAM
- The 2023 ICPC Asia EC Regionals Online Contest (I)
- The 2024 ICPC Asia East Continent Online Contest (I)AST
- 記錄一次 Online DDL 操作
- SharePoint Online 為Modern Page新增指令碼指令碼
- pt-online-schema-change和XtraBackup的