Replication Problem [message #75131] |
Wed, 02 January 2002 22:15 |
K.Subramanian
Messages: 1 Registered: January 2002
|
Junior Member |
|
|
During Snapshot Replication the Data is waiting to update the table and since the time lapses it bounces back and stored in deferred transaction. The dbms jobs service turn Broken and date automatically goes for future date.
My Sub-Server B replicates with Main Server A which are in different location. Several subservers are replicating with Main Server.
Where is the problem ? and solution for the same.
Regards
K.subramanian
----------------------------------------------------------------------
|
|
|
Re: Replication Problem [message #75162 is a reply to message #75131] |
Mon, 08 April 2002 04:06 |
Frank Naude
Messages: 4590 Registered: April 1998
|
Senior Member |
|
|
Hi,
You can schedule a job to fix broken jobs when they occur. Example:
set serveroutput on
-- Create the job...
create or replace procedure keep_jobs_unbroken as
begin
for c1 in (select job, broken from dba_jobs where broken = 'Y') loop
dbms_output.put_line('Resume broken job '||c1.job);
dbms_job.broken(c1.job, false); -- Reactivate job if broken
end loop;
end;
/
show errors
-- Schedule the job...
declare
v_job number;
begin
select job into v_job from user_jobs where what like '%keep_jobs_unbroken%';
dbms_job.remove(v_job);
dbms_job.submit(v_job, 'keep_jobs_unbroken;', sysdate,
'sysdate+1/(3*60*24)'); -- Run every 20 sec
dbms_job.run(v_job);
dbms_output.put_line('Job '||v_job||' re-submitted.');
exception
when NO_DATA_FOUND then
dbms_job.submit(v_job, 'keep_jobs_unbroken;', sysdate,
'sysdate+1/(3*60*24)'); -- Run every 20 sec
dbms_job.run(v_job);
dbms_output.put_line('Job '||v_job||' submitted.');
end;
/
Best regards.
Frank Naude
|
|
|
|