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: does dbms_job.submit work?

Re: does dbms_job.submit work?

From: Mark G <mgumbs_at_nospam.hotmail.com>
Date: Fri, 2 Jul 1999 09:21:33 +0100
Message-ID: <377c742c.0@145.227.194.253>


Are you sure your procedure guguck compiled succesfully? Your insert statement looks wrong, you may need brackets around your values clause

create or replace procedure guguck as
begin
 insert into debug_log
 (text, timestamp)
 values
 ('this record is inserted by guguck', sysdate);  commit;
end;

Just a quick sanity test...

SQL> insert into temp2
  2 (a,b)
  3 values
  4 'aaa','bbb';
'aaa','bbb'
*
ERROR at line 4:
ORA-00906: missing left parenthesis

SQL> l
  1 insert into temp2
  2 (a,b)
  3 values
  4* 'aaa','bbb'
SQL> 4 ('aaa','bbb')
SQL> l
  1 insert into temp2
  2 (a,b)
  3 values
  4* ('aaa','bbb')
SQL> / 1 row created.

Also, i'm not 100% sure but don't you have to allocate v_jobNo a number?

HTH, Mark

BM Lam <1116-530_at_online.de> wrote in message <377A8CB4.6E9C8A5_at_online.de>...
>I wrote a procedure as follows:
>
>create or replace procedure guguck as
>begin
> insert into debug_log
> (text, timestamp)
> values
> 'this record is inserted by guguck', sysdate;
> commit;
>end;
>
>
>The procedure gets compiled just fine (I have created table debug_log
>prior to that). Then
>I entered:
>
>declare
> v_JobNo binary_integer;
>begin
> dbms_job.submit(v_jobNo, 'guguck;', sysdate+1/(24*60));
>end;
>
>
>The message "PL/SQL procedure successfully completed." is returned.
>Also user_jobs showed a new job scheduled for the next minute.
>
>But when I checked debug_log after the scheduled time (several times) I
>never found the record I mean to insert in procedure GUGUCK.
>
>I tested this on Oracle7 and 8. Neither worked.
>
>Any hint/explanation will be greatly appreciated.
Received on Fri Jul 02 1999 - 03:21:33 CDT

Original text of this message

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