使用DATAPUMP升级DB与Oracle Text索引无法成功导入

今天晚上值守升级,用datapump从10204迁移数据库到11203

因为只是值守,这个升级我一直就是打酱油的

客户导完数据,帮忙比对了下数据,发现差了几个IOT表和TEXT索引

检查日志发现几个如下的报错

ORA-39083: Object type INDEX failed to create with error:
ORA-20000: Oracle Text error:
DRG-52204: error while registering index
DRG-10507: duplicate index name: IDX_TF_CMS_CONTENT_TITLE, owner: SCWY
Failing sql is:
BEGIN
ctxsys.driimp.create_index('IDX_TF_CMS_CONTENT_TITLE','TF_CMS_CONTENT',USER,
'CONTENT_ID','2','TITLE','1',
'500','4617','8130','4618',
NULL, NULL, NULL, 0,NULL, NULL, NULL, NULL, NULL );

客户在演练的时候,看到说索引名重复就直接跳过了,也没关注

查看了下当前情况:
1.报重复的索引,数据库中根本没有
2.ctxsys.dr$index表中,有这些TEXT索引的记录,但是OWNER_ID为0,既SYS。而源库上,OWNER应该为应用用户

查了下MOS

Text Indexes In Import State And Owned Incorrectly By SYS After DataPump export / import DataPump [ID 744162.1]

ORA-39083 DRG-10507 Errors On DataPump Import [ID 987033.1]

This is due to unpublished bug 5731054 fixed in 11.1, where a DRG-10507 error occurs on DataPump import, however the underlying problem is caused in the export process where duplicate index entries are created for a 'function-based domain index', which gets both 'functional index' and 'domain index' entries created, and hence can occur on import into 11g and later versions when using a 10.2 export dump file.

处理方法:
1.清除一些错误的元数据,清除前最好备份这些表
connect / as sysdba
select idx_id from ctxsys.dr$index where idx_name='';
delete from ctxsys.dr$index_value where IXV_IDX_ID = ;
delete from ctxsys.dr$index_object where IXO_IDX_ID = ;
delete from ctxsys.dr$index where idx_id = ;
commit;

2.使用TOAD从源端上提取创建这些索引的脚本创建相关TEXT索引

PS:如果使用了自定义的preferences,要从ctxsys.ctx_preferences,ctxsys.ctx_preference_values中提取数据创建这些preferences。特别是在需要对中文进行分词时,一般都有

如果准备从10204升级到11gR2,最好打上Patch 6051635,目前只有LINUX-64bit 和 Solaris on SPARC 64bit有
10205应该是没问题的。反正重在先测试

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8242091/viewspace-733004/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/8242091/viewspace-733004/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值