DML DDL 都報ORA-00600: [kntgMvLogObjn]的解決辦法

gxlineji發表於2017-12-21
對錶進行DML 或DDL 都報ORA-00600:  [kntgMvLogObjn]。

(1)先刪除materialized view log ,然後再對錶進行DML 或DDL 。
select * from dba_mviews;
select * from dba_mview_logs;
drop materialized view log on  TABLE_NAME;
(2)如果第一步還不能解決,那麼就需要重建MATERIALIZED VIEW LOG
一般是之前重新命名過使用者或表。可能是在obj$等資料字典中的資訊出現了不一致的情況。
可以參考 Doc ID 1612402.1 對於這類問題Oracle的一個建議就是使用重建物化檢視日誌,使用with rowid的方式來建立,然後刪除。
SELECT * FROM  sys.MLOG$;
CREATE MATERIALIZED VIEW LOG ON TABLE_NAME WITH ROWID;
drop materialized view log ON TABLE_NAME;


官方的解釋如下:
Cause
Dictionary information related to a materialized view log defined on the table is partly missing due to a rename of a table while a materialized view log was still defined on it and afterwards trying to drop the table.
The MLOG$ entry didn't exist but the MLOG$_... segment in OBJ$ still existed, and the table referenced in its flags that it uses a materialized view log.
Solution
To implement a solution for this issue please execute the following steps in the given order:
    drop the MLOG$_... segment from the database using a DROP TABLE command
    create a new materialized view log using CREATE MATERIALIZED VIEW LOG ON <table> WITH ROWID;
    drop the table with the materialized view log defined on it

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10995764/viewspace-2149009/,如需轉載,請註明出處,否則將追究法律責任。

相關文章