Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: automatic refresh of materialized view does not work
Matthieu Exbrayat wrote:
> Frank van Bortel wrote:
>
>> Need a db link, need a job (on the MV side, iirc), and >> need to have job_processes on the remote site...
What do you do to refresh it manually? dbms_snapshot.refresh(<snapshot>);
Put that in a procedure, and create a job to call that
procedure:
create procedure refresh_mymv as
begin
dbms_snapshot.refresh('mmm');
end;
/
Then, create the job in an anonymous pl/sql block:
DECLARE
ln_retval BINARY_INTEGER;
BEGIN
DBMS_JOB.submit (job => ln_retval, what => 'refresh_mymv;', interval => 'sysdate + 5/1440' );
-- Regards, Frank van BortelReceived on Fri Feb 13 2004 - 08:20:19 CST