暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

xtts ORA-39943

原创 黑獭 2024-07-25
219

今天在做xtts迁移的时候碰到了个数据库报错,现将信息整理如下:

检查表空间的自包含情况:execute sys.dbms_tts.transport_set_check('XXX,XXX,XXX', true);检查是否有报错信息:select * from sys.transport_set_violations;发现大量如下报错:ORA-39943: Global index XXX in tablespace XXX has orphaned entries.
发现索引里面有孤儿数据,大致有下面几个方法:1 能确定索引没什么用,删了了事。2 对索引进行清理:alter index <<index_name>> coalesce cleanup parallel 5;并行度根据实际情况设置3 重建索引:alter index <<<index name>>> rebuild online parallel 4;
下面是参考的mos文档信息:Transportable Tablespaces (TTS) Export Failed WITH ORA-39943: Global index XXX in tablespace YYY has orphaned entries. (Doc ID 3005636.1) 文档内容如下:
APPLIES TO:Oracle Database - Enterprise Edition - Version 19.19.0.0.0 and laterInformation in this document applies to any platform.SYMPTOMSErrors during TTS export:
ORA-39123: Data Pump transportable job abortedORA-39187: The transportable set is not self-contained, violation list is:
ORA-39943: Global index <<index name>> in tablespace <tablespace_name> has orphaned entries.
job "SYS"."SYS_EXPORT_TRANSPORTABLE_01" stopped due to fatal error.
CHANGES N/A
CAUSETablespace <tablespace_name> has orphaned entries.



SOLUTION
alter index <<index_name>> coalesce cleanup parallel 5;

exec dbms_part.cleanup_gidx('<<schema_name>>');
ERROR as line 1:ORA-20000: No global index segments were cleanedORA-06512: at "SYS.DBMS_PART", line 225ORA-06512: at "SYS.DBMS_PART", line 290ORA-06512: at line 1
Testing internally demonstrated that the aforementioned solution is effective, but it did not prove successful for one customer.
If the above does not work, then use the solution below.

alter index <<<index name>>> rebuild online parallel 4;
After rebuilding the index, sys.dbms_tts.transport_set_check returned no errors.
SQL> EXEC sys.dbms_tts.transport_set_check('TBS1,TBS2',TRUE); >>>>>>>>>>>>replace with your tablespace names.SQL> select * from sys.transport_set_violations;
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论