[重慶思莊每日技術分享]-在為表新增了列後執行ALTER TABLE SHRINK SPACE 提示ORA-8102
APPLIES TO:Oracle Database - Standard Edition - Version 12.1.0.1 to 19.7.0.0.0 [Release 12.1 to 19]
Information in this document applies to any platform.
SYMPTOMS
ALTER TABLE SHRINK SPACE command returns ORA-8102 after adding column.
SQL> alter table <TABLE_NAME> shrink space;
alter table <TABLE_NAME> shrink space
*
ERROR at line 1:
ORA-08102: index key not found, obj# NNNNN, file N, block NNNNN (2)
CHANGES
After adding a column with add column optimization and creating a new index on the column.
"add column optimization" is enabled by default when adding a column with DEFAULT value.
alter table <TABLE_NAME> add <COLUMN_NAME_NEW> number default 10 not null;
create index <INDEX_NAME_NEW> on <TABLE_NAME> ( <COLUMN_NAME1>, <COLUMN_NAME_NEW>);
CAUSE
This problem has been investigated under Bug:22473983.
SOLUTION
After the error:
Drop a index on the table for the added column. And rerun ALTER TABLE SHRINK SPACE command.
After completion the shrink table, recreate the index as you need.
drop index <INDEX_NAME_NEW>;
Before the adding columns:
Before adding columns, set parameter "_add_col_optim_enabled" = false.
alter session set "_add_col_optim_enabled" = false;
alter table <TABLE_NAME> add <COLUMN_NAME_NEW> number default 10;
create index <INDEX_NAME_NEW> on <TABLE_NAME> ( <COLUMN_NAME1>, <COLUMN_NAME_NEW>);
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/69950318/viewspace-2864602/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- [重慶思莊每日技術分享]-ORA-1142 signalled during: ALTER DATABASE END BACKUPDatabase
- alter table move與shrink space
- [重慶思莊每日技術分享]-expdp按日期匯出表
- [重慶思莊每日技術分享]-執行DROP USER ... CASCADE操作刪除很慢
- [重慶思莊每日技術分享]-重建 oracle Bootstrap IndexesOraclebootIndex
- [重慶思莊每日技術分享]-psu報錯“CheckActiveFilesAndExecutables” failedAI
- [重慶思莊每日技術分享]-asynch descriptor resize等待事件事件
- [重慶思莊每日技術分享]-free buffer waits 等待事件AI事件
- [重慶思莊每日技術分享]-12.2 Auto Space Advisor Job Fails ORA-12012,ORA-00060AI
- [重慶思莊每日技術分享]-閃回表時報錯ORA-38305
- [重慶思莊每日技術分享]-ora-12592包錯誤
- [重慶思莊每日技術分享]-oracle 12c透明加密Oracle加密
- [重慶思莊每日技術分享]-$ORACLE_HOME/OPatch/ocm/bin/emocmrsp 不再有了Oracle
- [重慶思莊每日技術分享]-Redhat Linux 6.5安裝ORACLE ASMLIBRedhatLinuxOracleASM
- [重慶思莊每日技術分享]-重建LOB欄位上的IndexIndex
- [重慶思莊每日技術分享]-清除控制檔案的資訊
- [重慶思莊每日技術分享]-控制檔案自動備份
- [重慶思莊每日技術分享]-監聽的靜默配置安裝
- [重慶思莊每日技術分享]-Oracle expdp ORA-01775: looping chain of synonymsOracleOOPAI
- [重慶思莊每日技術分享]-ORA-16525 dg broker不可用
- [重慶思莊每日技術分享]-RAC 一節點Listener狀態為Not All Endpoints Registered
- [重慶思莊每日技術分享]-local_listener導致登入異常
- [重慶思莊每日技術分享]-如何禁止普通使用者使用crontab 命令?
- [重慶思莊每日技術分享]-ORA-16018 異常處理記錄
- [重慶思莊每日技術分享]-ORACLE 19C 實現不管大小寫Oracle
- [重慶思莊每日技術分享]-安裝GI時報錯“Oracle Restart Integrity”OracleREST
- [重慶思莊每日技術分享]-PSU實施異常unable to get oracle owner forOracle
- [重慶思莊每日技術分享]-oracle ins,INS-32027 during Oracle 12 upgradeOracle
- [重慶思莊每日技術分享]-ORACLE19C UNDO共享模式轉換為本地模式Oracle模式
- [重慶思莊每日技術分享]-在自動UNDO管理情況下,如何手工增加undo段
- [重慶思莊每日技術分享]-Windows手動離線安裝netframework3.5WindowsFramework
- [重慶思莊每日技術分享]-備庫使用RMAN獲得歸檔日誌
- [重慶思莊每日技術分享]-ORACLE 12C 新功能 max_idle_timeOracle
- [重慶思莊每日技術分享]-安裝19c grid時執行指令碼報CRS-1705錯誤指令碼
- [重慶思莊每日技術分享]-11G 打補丁遇到:unable to get oracle owner forOracle
- [重慶思莊每日技術分享]-AQ Failing With ORA-6544 [pevm_peruws_callback-1] [16224]AI
- [重慶思莊每日技術分享]-oracle 19c 建立快照報錯:ORA-65227Oracle
- [重慶思莊每日技術分享]-ORA-38775: cannot disable recovery area 異常處理