Home » Server Options » Replication » procedure refresh materialized view submit a job
icon5.gif  procedure refresh materialized view submit a job [message #124383] Fri, 17 June 2005 17:03 Go to next message
ekam
Messages: 1
Registered: June 2005
Junior Member
I am trying to create a procedure that will refresh a materialized view and then submit a job which will fire off a few minutes later to run a report. I'm having a problem in that the mview gets refreshed and the job gets submitted but instead of just running once it goes into some kind of loop and tries to run several times. Both procedures work fine by themselves. My code is as follows:

create or replace procedure refresh_mv as
l_jobid number;

begin
dbms_mview.refresh('my_view','c');

dbms_job.submit(l_jobid, 'my_report', sysdate+1/1440, null);
commit;

end;
/

I believe it has something to do with the refresh but for the life of me I can't figure this one out. ANYONE?????
Re: procedure refresh materialized view submit a job [message #124659 is a reply to message #124383] Mon, 20 June 2005 16:33 Go to previous message
Frank Naude
Messages: 4579
Registered: April 1998
Senior Member
Not sure if it would help, but the "interval" (4th parameter) is a string. So, try:

dbms_job.submit(l_jobid, 'my_report', sysdate+1/1440, 'null');


Best regards.

Frank
Previous Topic: Refresh On Commit not refreshing accurately
Next Topic: Data replication
Goto Forum:
  


Current Time: Thu Mar 28 13:17:16 CDT 2024