連結:
IMPDP匯入資料發現ORA-00001 Unique Constraint SYS.I_JOB_JOB Violated錯誤
ORA-39083: Object type JOB failed to create with error:
ORA-00001: unique constraint (SYS.I_JOB_JOB) violated
Failing sql is:
BEGIN DBMS_JOB.ISUBMIT( JOB=> 63, NEXT_DATE=> TO_DATE('2012-04-27 00:00:00',
'YYYY-MM-DD:HH24:MI:SS'), INTERVAL=> 'TRUNC(SYSDATE+1)', WHAT=> 'GBEAS1.UPDATE_EMP_INFO;',
NO_PARSE=> TRUE); END;
Job "GBEAS3"."SYS_IMPORT_FULL_01" completed with 8 error(s) at 16:05:58
|
錯誤原因(該job=63已經存在資料庫中)
select job, what from dba_jobs where job=63;
JOB WHAT
----- --------
63 proc_xifenfei
|
注意:如果該job正在執行,可能需要查詢DBA_JOBS_RUNNING
解決辦法
1.手工建立job,指定一個不存在的job 號
declare
m_job number;
begin
select max (job) + 1
into m_job
from dba_jobs;
BEGIN DBMS_JOB.ISUBMIT( JOB=> m_job, NEXT_DATE=> TO_DATE('2012-04-27 00:00:00',
'YYYY-MM-DD:HH24:MI:SS'), INTERVAL=> 'TRUNC(SYSDATE+1)', WHAT=> 'GBEAS1.UPDATE_EMP_INFO;',
NO_PARSE=> TRUE); END;
end;
/
2.刪除原存在job
exec dbms_job.remove (63);
|