ORA-02429 報錯處理

datapeng發表於2013-12-07

刪除索引主鍵約束引時ORA-02429錯誤的解決方法:

select table_name from user_indexes where INDEX_NAME = '&index_name'
select index_name,table_NAME from USER_indexes where  table_name='TSP_INDEXIMAGES';

SELECT CONSTRAINT_NAME,CONSTRAINT_TYPE,TABLE_NAME,INDEX_NAME FROM ALL_CONSTRAINTS WHERE TABLE_NAME='&TABLE';


SQL> DROP INDEX  PK;
DROP INDEX  PK
            *
ERROR at line 1:
ORA-02429: cannot drop index used for enforcement of unique/primary key

SQL> ALTER TABLE TSP_INDEXIMAGES MODIFY PRIMARY KEY DISABLE;
SQL> DROP INDEX  PK;
Index dropped.

SQL> ALTER TABLE TSP_INDEXIMAGES MODIFY PRIMARY KEY enable

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

相關文章