ora-00604,ora-02429:無法刪除用於強制唯一/主鍵的索引。

來源:互聯網
上載者:User

今天刪除資料庫中的資料表空間時,發現始終刪不掉,錯誤資訊為:"ora-00604,ora-02429:無法刪除用於強制唯一/主鍵的索引。"

最終發現是其他某個使用者在建立索引時沒有注意到其中tablespace設定,直接把這個索引的資料表空間指定到這個資料表空間中,故刪除之,並重新建立到其他資料表空間中.故障接觸.

操作文法:
select 'alter table '||owner||'.'||table_name||' drop constraint '||constraint_name||' ;'
from dba_constraints
where constraint_type in ('U', 'P')
   and (index_owner, index_name) in
       (select owner, segment_name
          from dba_segments
         where tablespace_name = 'ENESYS0922');

更多Oracle相關資訊見Oracle 專題頁面 http://www.bkjia.com/topicnews.aspx?tid=12

相關文章

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.