删除表空间抛出错误ORA-02429:无法删除用于执行Oracle SQL中唯一/主键的索引

发布于 2025-01-27 04:20:56 字数 938 浏览 4 评论 0原文

我想放下一个存储索引的表空间。

drop tablespace THR_TBS_IDX INCLUDING CONTENTS AND DATAFILES; 

这是我遇到的错误,

Error report -
ORA-00604: error occurred at recursive SQL level 1
ORA-02429: cannot drop index used for enforcement of unique/primary key
00604. 00000 -  "error occurred at recursive SQL level %s"
*Cause:    An error occurred while processing a recursive SQL statement
           (a statement applying to internal dictionary tables).
*Action:   If the situation described in the next error on the stack
           can be corrected, do so; otherwise contact Oracle Support.

我试图查看索引阻塞删除的错误,但是它没有从以下SQL语句中返回记录。我不知道在表空间中停止删除

 select owner, constraint_name,table_name,index_owner,index_name
from dba_constraints
where (index_owner,index_name) in (select owner,index_name from dba_indexes
where tablespace_name='THR_TBS_IDX');

需要一些帮助,以便在这里弄清楚如何成功删除该表格。

I wanted to drop a tablespace that stores index.

drop tablespace THR_TBS_IDX INCLUDING CONTENTS AND DATAFILES; 

And this is the error I got

Error report -
ORA-00604: error occurred at recursive SQL level 1
ORA-02429: cannot drop index used for enforcement of unique/primary key
00604. 00000 -  "error occurred at recursive SQL level %s"
*Cause:    An error occurred while processing a recursive SQL statement
           (a statement applying to internal dictionary tables).
*Action:   If the situation described in the next error on the stack
           can be corrected, do so; otherwise contact Oracle Support.

I tried to see what indexes is blocking the deletion, but it returned no records from the following sql statement. I do not know what in the tablespace is stopping the deletion

 select owner, constraint_name,table_name,index_owner,index_name
from dba_constraints
where (index_owner,index_name) in (select owner,index_name from dba_indexes
where tablespace_name='THR_TBS_IDX');

Need some help here to figure out how to drop this tablespace successfully.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

俏︾媚 2025-02-03 04:20:57

尝试擦洗回收箱。
然后禁用它
只有之后,您才能将您放下TB

Try to Purdge recycle bin.
then disable it
and only after this you can drop you TB

烟花肆意 2025-02-03 04:20:57

ORA-02429表示您要删除的索引是主要键。
尽管主键是索引,也是一个约束。您应该首先将其视为约束,然后将其丢弃为索引。
首先,我们放弃约束。
然后删除索引

ORA-02429 means that the index you want to drop is a primary key.
Although primary key is an index its also a constraint. You should treat it like a constraint first then drop it as an index.
first we drop the constraint.
Then drop the index

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文