spool cr_repl_prebuilt.log /* Section 1 : Create the Refresh Group */ connect mvadmin/******@REPL begin dbms_refresh.make( name=>'MVADMIN.TEST1', list=>'', next_date=>sysdate+5/(24*60), interval=>'sysdate+5/(24*60)', implicit_destroy=>TRUE, lax=>FALSE, job=>0, /* rollback_seg=>'RBS6', Use this if you want to use a particular RBS */ push_deferred_rpc=>FALSE, refresh_after_errors=>TRUE, purge_option=>NULL, parallelism=>NULL, heap_size=>NULL); end; / prompt Refresh Group Created... /* Section 2 : Create Snapshot Replication Group */ begin dbms_repcat.create_snapshot_repgroup( gname=>'TEST1', master=>'PROD', propagation_mode=>'ASYNCHRONOUS'); end; / prompt Master RepObject Created... /* Section 3 : Store the snaphot log entries */ connect ananda/******@REPL col part_tab_name noprint new_value part_tab_val select substr('TEST1',1,20) part_tab_name from dual / drop table mlog_bak / create table mlog_bak as select * from mlog$_&&part_tab_val.@PROD / /* Section 4 : Built the snapshot */ create snapshot ananda.TEST1 on prebuilt table refresh fast as select * from ananda.TEST1@PROD / prompt Snapshot Created /* Section 5 : Add the snapshot to the refresh group */ begin dbms_refresh.add( name=>'MVADMIN.TEST1', list=>'ANANDA.TEST1', lax=>TRUE); end; / prompt Snapshot added /* Section 6 : Build replication support for the group */ connect mvadmin/******@REPL begin dbms_repcat.create_snapshot_repobject( gname=>'TEST1', sname=>'ANANDA', oname=>'TEST1', type=>'SNAPSHOT', min_communication=>TRUE); end; / prompt Snapshot RepObject Created /* Section 7 : Restore the snapshot log entries */ connect ananda/******@REPL insert into mlog$_&&part_tab_val.@PROD select * from mlog_bak / commit / prompt Interim Mlog entries Inserted spool off