alert日志显示如下:
ORA-00600: internal error code, arguments: [kauupd:2], [], [], [], [], [], [], [], [], [], [], []
执行的sql类似如下:
merge into tab1 a
using (select code from cus1 where code > 1) b
on (a.code = b.code)
when matched then
update set a.total = a.total * 2
1 select d.index_name,d.UNIQUENESS,d.partitioned,VISIBILITY,d.status,
2 listagg(i.column_name,',') within group (order by i.column_position,d.index_name) column_name
3 from dba_indexes d,dba_ind_columns i
4 where d.table_name=upper('&tname')
5 and d.owner=i.index_owner
6 and d.index_name=i.index_name
7 and d.table_name=i.table_name
8 and d.table_owner=i.table_owner
9* group by d.table_owner,d.owner,d.table_name,d.index_name,d.UNIQUENESS,d.partitioned,VISIBILITY,d.status
问题原因
发生错误是因为与主键关联的索引是非唯一索引
解决方案
删除索引并使用 unique 子句重新创建索引
alter table sales drop constraint pk_sales;
drop index pk_sales;
create unique index pk_tab1 on tab1 (code) parallel 4 online;
alter index pk_tab1 noparallel;
alter table tab1 add (constraint pk_tab1 primary key (code) using index local) ;
参考文档
ORA-600 [Kauupd:2] during execution of a merge command (Doc ID 1343015.1)
标签:index,code,name,kauupd,into,merge,owner,table,tab1 From: https://blog.51cto.com/u_13482808/7437393