ORA-12986錯誤解決

來源:互聯網
上載者:User

今天在刪除一個大表的列,意外被DBA重啟DB後,再執行查詢時,就報了ORA-12986這個錯誤,先來一起瞭解下這個錯誤:

ORA-12986: columns in partially dropped state. Submit ALTER TABLE DROP COLUMNS CONTINUE

Cause: An attempt was made to access a table with columns in partially dropped state (i.e., drop column operation was interrupted).

Action: Submit ALTER TABLE DROP COLUMNS CONTINUE to complete the drop column operation before accessing the table.

可以看到導致這個錯誤的原因是因為你正在刪除列,但是刪除到一半時,進程被意外終止了,導致表處在部分刪除狀態,所以報了咋麼個錯誤,你要做的就是繼續刪除,看下下面的例子:

1.將列置為unused

ALTER TABLE test1 SET UNUSED COLUMN Tablespace_name;

2.刪除unused列

ALTER TABLE test1 DROP UNUSED COLUMN CHECKPOINT 5;

在未執行完畢前,用 shutdown abort強制關閉資料庫(如果用shutdown immediate就看不到效果,它會等到執行完畢才會關閉資料庫)

3.重新啟動資料庫,查看test1表,報錯

4.繼續刪除未刪完的列

ALTER TABLE test1 DROP COLUMNS continue

5.執行完畢後重新查詢test1表,就OK了

ORA-01172、ORA-01151錯誤處理

ORA-00600 [2662]錯誤解決

ORA-01078 和 LRM-00109 報錯解決方案

ORA-00471 處理方法筆記

ORA-00314,redolog 損壞,或丟失處理方法

ORA-00257 歸檔日誌過大導致無法儲存的解決辦法

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.