Re: How to Extract job from database to create in another database

From: Eriovaldo Andrietta <ecandrietta_at_gmail.com>
Date: Mon, 8 Oct 2012 15:20:58 -0300
Message-ID: <CAJdDhaPVf9jKMT5Dh5suvO9MonEZE0j+6iLWGBQcaMw0PUFzEg_at_mail.gmail.com>



Hi,
The error I am getting is:

-00017: following statement failed with ORACLE error 1:

 "BEGIN   DBMS_JOB.ISUBMIT(JOB=>2,WHAT=>'delete te_bo where data"
 " < sysdate - 40/1440;',NEXT_DATE=>TO_DATE('2012-09-03:21:10:28','YYYY-MM-"
 "DD:HH24:MI:SS'),INTERVAL=>'sysdate + 30/1440',NO_PARSE=>TRUE); END;"
IMP-00003: ORACLE error 1 encountered
ORA-00001: unique constraint (SYS.I_JOB_JOB) violated
ORA-06512: at "SYS.DBMS_JOB", line 100
ORA-06512: at line 1

When doing the import of the job that were exported from another database , the ID exists.

So I need to do a script to extract the code and control the ID.

Any experience with this kind of issue ?

Regards
Eriovaldo

On Mon, Oct 8, 2012 at 2:47 PM, Eriovaldo Andrietta <ecandrietta_at_gmail.com>wrote:

> Hi Friends,
>
> I have some jobs create in the database.
> I need to generete the command to create the same job, with same
> parameters and instructions into anoter database.
>
> Is there anyway to do it not using exp/imp ?
>
> Does the DBMS_METADATA do it ?
>
> Any experience extracting this kind of command ?
>
> Regards
> Eriovaldo
>

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Oct 08 2012 - 20:20:58 CEST

Original text of this message