JOB 调用的存储过程。在alter日志里面看到
Errors in file /oracle/u01/admin/product/bdump/product_j001_30968.trc:
ORA-12012: 自动执行作业 25 出错
ORA-00001: 违反唯一约束条件 (SSOUSER.SSO_NODEID)
ORA-06512: 在 "SSOUSER.JOB_VNET_MAX", line 3
ORA-06512: 在 line 1
Thu Aug 19 10:50:48 2010
Errors in file /oracle/u01/admin/product/bdump/product_j000_5468.trc:
ORA-12012: 自动执行作业 25 出错
ORA-00001: 违反唯一约束条件 (SSOUSER.SSO_NODEID)
ORA-06512: 在 "SSOUSER.JOB_VNET_MAX", line 3
ORA-06512: 在 line 1
Thu Aug 19 10:55:43 2010
Errors in file /oracle/u01/admin/product/bdump/product_j003_771.trc:
ORA-12012: 自动执行作业 25 出错
ORA-00001: 违反唯一约束条件 (SSOUSER.SSO_NODEID)
ORA-06512: 在 "SSOUSER.JOB_VNET_MAX", line 3
ORA-06512: 在 line 1
Thu Aug 19 10:58:15 2010
Errors in file /oracle/u01/admin/product/bdump/product_j001_30968.trc:
ORA-12012: 自动执行作业 25 出错
ORA-00001: 违反唯一约束条件 (SSOUSER.SSO_NODEID)
ORA-06512: 在 "SSOUSER.JOB_VNET_MAX", line 3
ORA-06512: 在 line 1
Thu Aug 19 10:58:32 2010
Errors in file /oracle/u01/admin/product/bdump/product_j001_30968.trc:
ORA-12012: 自动执行作业 25 出错
ORA-00001: 违反唯一约束条件 (SSOUSER.SSO_NODEID)
ORA-06512: 在 "SSOUSER.JOB_VNET_MAX", line 3
ORA-06512: 在 line 1
JOB:
每10秒执行一次
begin
sys.dbms_job.submit(job => :job,
what => 'job_vnet_max;',
next_date => to_date('19-08-2010 11:07:29', 'dd-mm-yyyy hh24:mi:ss'),
interval => 'SYSDATE+1/8640');
commit;
end;
/
PROCEDURE:
create or replace procedure job_vnet_max as
begin
insert into vnet_reginfoapp
select t.* from vnet_reginfoapp@sso211 t ,(
select max(t.nodeid) AS nodeid_max
from vnet_reginfoapp@sso211 t
left join vnet_reginfoapp v on t.nodeid = v.nodeid
where v.nodeid is null
) nodeids
where t.nodeid=nodeids.nodeid_max;
end;
nodeid是主键
刚刚下面sql查出来为空
select t.* from vnet_reginfoapp@sso211 t ,(
select max(t.nodeid) AS nodeid_max
from vnet_reginfoapp@sso211 t
left join vnet_reginfoapp v on t.nodeid = v.nodeid
where v.nodeid is null
) nodeids
where t.nodeid=nodeids.nodeid_max;
是不是为空的时候 insert 是会报ORA-00001: 违反唯一约束条件 (SSOUSER.SSO_NODEID)???
各位大师 求解··