ORA-06512 CTXSYS drop user cascade

只是delete dr$index 就可以了,但是drop 后两两个表中还有残留data。

unable to drop user

aditya bisht, October 10, 2024 - 10:36 am UTC

SQL> drop user wacsmdms cascade;

drop user wacsmdms cascade

*

ERROR at line 1:

ORA-00604: error occurred at recursive SQL level 1

ORA-20000: Oracle Text error:

DRG-11338: policy WACSMDMS"."SDP_DIM_MAIL_ADDRESS_IDX does not exist

ORA-06512: at "CTXSYS.DRUE", line 186

ORA-06512: at "CTXSYS.CTX_ADM", line 280

ORA-06512: at line 1

October 10, 2024 - 5:06 pm UTC

Oracle Text metadata has become inconsistent. The index was dropped, but the meta data not updated.

You'll need to remove this information from the CTXSYS tables with statements like:

delete from ctxsys.dr$index_value where IXV_IDX_ID = ?;

delete from ctxsys.drindex_object where IXO_IDX_ID = ?; delete from ctxsys.drindex where idx_id = ?;

See MOS note 2877418.1 for more details. If you're still struggling contact Oracle support.

问题是我们无法从 sqlplus 中删除用户

。SQL> select object_name , OBJECT_TYPE,CREATED , STATUS from dba_objects

where owner='SQL_WIFGWIHDMSBUHBARKGXAYFYMT';

没有选择任何行

SQL> DROP USER SQL_WIFGWIHDMSBUHBARKGXAYFYMT CASCADE;

删除用户 SQL_WIFGWIHDMSBUHBARKGXAYFYMT 时发生级联

错误,错误位于第 1 行:

ORA-00604:递归 SQL 级别 1 发生错误

ORA-20000:Oracle Text 错误:

DRG-11338:策略 SQL_WIFGWIHDMSBUHBARKGXAYFYMT"JSON_FTS_IDX 不存在"

ORA-06512:位于"CTXSYS.DRUE",第 171 行

ORA-06512:位于"CTXSYS.CTX_ADM",第 279 行

ORA-06512:位于第 1 行

,该用户在 dba_objects 中没有任何对象,删除用户失败,错误信息

为"DRG-11338:策略 SQL_WIFGWIHDMSBUHBARKGXAYFYMT"JSON_FTS_IDX 不存在"。

诊断:

  1. 获取你的 sqlplus ospid,例如 xxxx。2

. 执行以下命令:ALTER SESSION SET EVENTS '10046 trace name context forever, level 12';

  1. 执行以下命令:DROP USER SQL_WIFGWIHDMSBUHBARKGXAYFYMT CASCADE;

  2. 检查跟踪目录 *xxxx.trc,

trc 文件包含正在运行的 SQL,包括递归 SQL。5

. 执行以下命令:ALTER SESSION SET EVENTS '10046 trace name context off';

解决方案:

发现 dr$index 表中存在 'JSON_FTS_IDX',而 dba_objects 表中不存在该项。手动删除 'JSON_FTS_IDX' 以清除路径。

Summary

Dropping a user fails with the following errors:

SQL> drop user TESTER cascade;

drop user TESTER cascade

*

ERROR at line 1:

ORA-00604: error occurred at recursive SQL level 1

ORA-20000: Oracle Text error:

DRG-11338: policy "TESTER"."DOC_INDEX" does not exist

ORA-06512: at "CTXSYS.DRUE", line 186

ORA-06512: at "CTXSYS.CTX_ADM", line 280

ORA-06512: at line 1

Solution

Delete the index metadata in the CTXSYS dictionary tables. Then drop the user.

The following statements manipulate the data dictionary and should not be executed without proper understanding of the situation.

The steps here are for experienced users only. Please take a BACKUP first as a precautionary measure.

connect / as sysdba

delete from ctxsys.dr$index_value where IXV_IDX_ID = 3500;

delete from ctxsys.dr$index_object where IXO_IDX_ID = 3500;

delete from ctxsys.dr$index where idx_id = 3500;

commit;

drop user TESTER cascade;

Cause

The index was dropped, but the CTXSYS meta-information about the index was not removed. Therefore, there is an inconsistency in the dictionary.

This is evident from the output below which shows the index exists in CTXSYS.DR$INDEX, but not in DBA_OBJECTS:

SQL> select owner, object_name, object_type, status

2 from dba_objects

3 where object_name like '%DOC_INDEX%'

4 and owner = 'TESTER';

no rows selected

SQL> select user_id from dba_users where username = 'TESTER';

USER_ID


297

SQL> select idx_id, idx_owner#, idx_name, idx_status

2 from ctxsys.dr$index

3 where idx_owner# = 297

4 and idx_name = 'DOC_INDEX';

IDX_ID IDX_OWNER# IDX_NAME IDX_STATUS


3500 297 TESTER INDEXED

相关推荐
BullSmall3 小时前
PostgreSQL 14 pg_dumpall 完整备份指南
数据库·postgresql·oracle
宇宙第一小趴菜8 小时前
三、Oracle 核心原理
数据库·oracle
龙仔7258 小时前
SQL Server OS_Core 数据库全自动备份【完整笔记·可直接复用】
数据库·笔记·oracle
Cloud云卷云舒1 天前
云卷云舒:从Oracle/MySQL迁移到HaishanDB:迁移评估工具核心技术拆解
mysql·oracle·ai-native·haishandb·信创数据库替换
段一凡-华北理工大学1 天前
向量数据库实战:选型、调优与落地~系列文章12:文本分块策略实战:chunk_size 怎么选?重叠多少?
开发语言·数据库·后端·oracle·rust·工业智能体·高炉智能化
oradh1 天前
Oracle XTTS实现跨版本迁移和升级(Oracle 11g单库升级至19C RAC集群)
数据库·oracle·11g升级19c·xtts跨版本迁移和升级
会编程的土豆1 天前
数据库范式
数据库·oracle
—Miss. Z—1 天前
计算机二级MySQL——简单应用题(存储过程&存储函数)
数据库·oracle·php
NineData2 天前
Oracle 卡住时先看阻塞源,ChatDBA 会先把锁链路理出来
数据库·oracle·ninedata·锁故障·锁等待·chatdba·锁阻塞
踏月的造梦星球2 天前
达梦数据库执行计划与性能分析入门:EXPLAIN、AUTOTRACE 与 ET
服务器·数据库·oracle