Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

dbms_job.submit failed

523364Jun 24 2007 — edited Jun 25 2007
Hi all,

I'm just wondering why is it that when i submit a job using dbms_job.submit, it always fails.. But when I try dbms_job.run or execute the procedure itself, the procedure was executed successfully and I was able to get the output that i want.

Here's my code snippet:

declare
x_job number;
begin
sys.dbms_job.submit(x_job, 'begin cl_msg2.cl_msg_call; end;', sysdate,NULL);
commit;
end;

I tried to check the alert_log.txt and it shows this error:

Errors in file /u1/oracle/admin/ABC4/bdump/snp3_1854.trc:
ORA-12012: error on auto execute of job 694
ORA-20001:
ORA-06512: at "ABCDEV.SYSTOR", line 81
ORA-06512: at "ABCDEV.CL_MSG2", line 512
ORA-06512: at "ABCDEV.CL_MSG2", line 21
ORA-06512: at line 1

When i check for the source of the error, I found out that the sqlcode it returns is 100.. which means no_data_found. It's doing an update on a table. (I've tried running the )

It's kinda weird because when I checked the record on the table, it DOES exists.. And as I've mentioned earlier, there's no problem when i use dbms_job.run to run the procedure.

I really don't have an idea as to what have caused the failure on the job.


Thanks and regards,
Anna
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 23 2007
Added on Jun 24 2007
5 comments
492 views