Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: dbms_job to submit a job to another database

Re: dbms_job to submit a job to another database

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Fri, 22 Oct 1999 16:02:46 -0400
Message-ID: <ZMIQOHscp7w1FTNSb8EnuUbV7ZFP@4ax.com>


A copy of this was sent to "Christophe" <facilys_at_club-internet.fr> (if that email address didn't require changing) On Fri, 22 Oct 1999 20:42:33 +0100, you wrote:

>Hi,
>
>I have 2 databases.
>I want to submit a job in the second base but from the first one with
>RDBMS_JOB.SUBMIT
>
>How can i do that?
>
>
>Thanks
>
>Christophe
>

what i usually do is to create a procedure in the other database that is used to submit the job. then i execute that through a database link. something like:

create or replace procedure some_proc( x in number ) as

   l_job number;
begin

   dbms_job.submit( l_job, 'some_proc_background( ' || x || ' );' ); end;
/

create or replace procedure some_proc_background( x in number ) as
begin

    .....
end;
/

that's stored in database2. then in database 1 i just:

begin

    some_proc_at_database2( 55 );
    commit;
end;

and that runs dbms_job on the other site for me and puts the info in that queue. it commits it so it can run the job.     

--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Fri Oct 22 1999 - 15:02:46 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US