ORA-30926: unable to get a stable set of rows in the source tables

今天在做etl加载历史数据,处理到8月份的时候,报错 ORA-30926: unable to get a stable set of rows in the source tables,该etl过程中有用merge语句,google该错误的解释:

Oracle Error :: ORA-30926

unable to get a stable set of rows in the source tables

Cause

A stable set of rows could not be got because of large dml activity or a non-deterministic where clause.

Action

Remove any non-deterministic where clauses and reissue the dml.

non-deterministic  非确定性的到底指的是什么呢?再搜

ORA-30926: unable to get a stable set of rows in the source tables" error if there is either a many-to-one or many-to-many relationship between the source and target tables. This is not as serious as it sounds because you would normally have to MERGE a one-to-one or one-to-zero relationship as your join condition would be protected by the target's primary key.

When performing a merge statement, the table to be merged had multiplerecords with the same key used for matching. While this is ok forrecords to be inserted into the target table, Oracle doesn't like thison the update portion of the statement. The solution is to remove the
duplicate or pick a matching key that is truely unique.

此处说明了,merge在做update子句的时候,违反target的主键约束可能会导致ora-30926 错误。

找出procedure,查看source,和target,结果看到source的确有重复记录,而且在清洗的时候没能发现这个bug。

好了,可以手工把重复记录删除,至少不影响历史资料的加载了。

 

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

转载于:http://blog.itpub.net/10159839/viewspace-364685/

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值