ITPub博客

首页 > Linux操作系统 > Linux操作系统 > ORA-30926: unable to get a stable set of rows in the source tables

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

原创 Linux操作系统 作者:gvora 时间:2009-08-31 17:37:07 0 删除 编辑

   这个错误是在使用MERGE INTO语句的时候出现的,具体的报错信息如下:

ERROR at line 1:

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

ORA-06512: at "ODS.P_CATSTORM_TMP", line 117

ORA-06512: at line 1

 

   查询一下ORA-30926错误的具体说明:

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.

 

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.

 

There is a restriction that multiple updates to the same row in the destination table is not allowed. ORA-30926 error will be returned if this is attempted.

 

    通过上面的信息可以得知,对目标表中的相同行数据进行多次更新是不允许的,这样会导致ORA-30926错误。

 

    追溯代码,确保MERGE INTOUSING表对于ON中的关联条件是唯一的,注意到DW.FACT_DEAL_AUCTION_D的数据是细化到AUCTION_ID的,会存在多条相同的CUSTIDCATID维度数据。通过使用group by修改代码即可解决。

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

请登录后发表评论 登录
全部评论

注册时间:2008-12-30

  • 博文量
    62
  • 访问量
    287748