Rem SCRIPT NAME:  MakeJob.sql
Rem  Creates a jobs to schedule execution periodically from given instance 
Rem  to a specified destination
Rem  You need to run this script at each master to set up a job to push 
Rem  transactions to other masters
Rem  Parameter: 1. destination's global name
Rem             2. Job repeat interval in seconds

DECLARE jobout number;
BEGIN
   DBMS_JOB.SUBMIT(jobout,
'DBMS_DEFER_SYS.EXECUTE('||'execute_as_user=>true,'||
  'destination=>'||''''||'&1'||''''||');',
SYSDATE,
'SYSDATE + (&2/(24*60*60))' );
END;
/
commit
/
