Oracle DB import error

importoracleoracle10g

I get the error below when importing a database – any ideas why? I do this type of import all the time and I've never seen this error.

Prior to doing the import we drop all objects in the schema. The import always fails when importing the same table..

  [exec] IMP-00017: following statement failed with ORACLE error 1:
     [exec] "BEGIN   DBMS_JOB.ISUBMIT(JOB=>99,WHAT=>' quemon();',NEXT_DATE=>TO_DATE('400"
     [exec] "0-01-01:00:00:00','YYYY-MM-DD:HH24:MI:SS'),INTERVAL=>'SYSDATE + 1/144 /* 1 "
     [exec] "Hour */',NO_PARSE=>TRUE); END;"
     [exec] IMP-00003: ORACLE error 1 encountered
     [exec] ORA-00001: unique constraint (SYS.I_JOB_JOB) violated
     [exec] ORA-06512: at "SYS.DBMS_JOB", line 97

Best Answer

You already have a job in the target database that is numbered 99. You'll need to drop that job.

Edit: The ISUBMIT procedure of dbms_job is a bit hard to find docs on. Here is where I found some. That procedure submits a job with a specified job number, whereas the SUBMIT procedure assigns a job number for you, avoiding this very problem. To remove the offending job (in your case), run:

execute dbms_job.remove(99);