Not able to handle jobs in a JOB QUEUE [message #61088] |
Sun, 28 March 2004 22:04 |
Shibaji Ghosh
Messages: 39 Registered: April 2002
|
Member |
|
|
Hello,
I am trying to use Oracle Job Queue feature. The scheduler will call a procedure every 1 min. Inside the procedure I have a drop table script. But once I submit the job, I could not find any data dictionary information of it from user_jobs view. Here is the block which will submit the job for calling the 'proc' procedure every 1 min. The procedure is fine and is behaving properly when I execute it separately.
declare
job_id integer;
begin
dbms_job.submit(job_id, 'proc;', sysdate , 'sysdate + 1/1440');
dbms_output.put_line('Job No : '||job_id||' submitted');
Exception
when others then
dbms_output.put_line(sqlerrm);
end;
The result of this script when execute is :
Job No : 30 submitted
But when I query user_tables view, I find no information. When I try to remove the job :
SQL> exec dbms_job.remove(30)
ORA-23421: job number 30 is not a job in the job queue
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
ORA-06512: at "SYS.DBMS_IJOB", line 525
ORA-06512: at "SYS.DBMS_JOB", line 253
ORA-06512: at line 1
I have the following init.ora parameters in place
job_queue_processes = 4
job_queue_interval = 60
I am executing everything from DGM user and also checking from DGM user. I am also not finding any job information from DBA_JOBS view (executed as SYS user).
Where am I going wrong ? Any privilege missing ? How do I handle the jobs and get necessary information about it ?
Can anybody help me out. Thanks in advance.
Regards,
Shibaji
|
|
|
|