problem in defining schedule push [message #344372] |
Fri, 29 August 2008 09:57 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
ma_rabii
Messages: 11 Registered: June 2008
|
Junior Member |
|
|
Hi every body,
I have a multimaster advance replication environment and we have less than 10 transaction per day
My first question is:I want to propagate data as soon as possible like sync if I setup the schedule push to propagate transaction every 5 seconds as below
BEGIN
DBMS_DEFER_SYS.SCHEDULE_PUSH(
destination => 'orc2',
interval => 'SYSDATE + (5/60*60*24)',
next_date => SYSDATE,
parallelism => 1,
delay_seconds => 10);
END;
/
is it correct approach?
-----------------------------------------------------------------
in other hand ,book(I mean Advance Replication) has written that for simulating continuous push we should setup it as below so it will propagate transaction every 1 minute.
My second question is:I know interval >= 'SYSDATE + (1/144)' means every 10 minutes a job will start and delay_seconds => 1200 means each job remain aware for 20 minutes,
but I can't understand the logic?why it can simulate 1 minute propagation? anybody knows?
BEGIN
DBMS_DEFER_SYS.SCHEDULE_PUSH(
destination => 'orc2',
interval => 'SYSDATE + (1/144)',
next_date => SYSDATE,
parallelism => 1,
execution_second >= 1500,
delay_seconds => 1200);
END;
My thrid question is :Which of the above setups is a better solution for my environment?
Thank you in advance.
Mery
|
|
|
Re: problem in defining schedule push [message #344620 is a reply to message #344372] |
Sun, 31 August 2008 01:40 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](/forum/images/custom_avatars/43710.gif) |
Barbara Boehmer
Messages: 9104 Registered: November 2002 Location: California, USA
|
Senior Member |
|
|
You are missing some parentheses in your interval in the first example. Notice the differences in the following:
SCOTT@orcl_11g> select sysdate, 5/60*60*24, sysdate + 5/60*60*24 as "120 days" from dual
2 /
SYSDATE 5/60*60*24 120 days
-------------------- ---------- --------------------
30-aug-2008 23:25:48 120 28-dec-2008 23:25:48
SCOTT@orcl_11g> select sysdate, 5/(60*60*24), sysdate + 5/(60*60*24) as "5 seconds" from dual
2 /
SYSDATE 5/(60*60*24) 5 seconds
-------------------- ------------ --------------------
30-aug-2008 23:25:48 .00005787 30-aug-2008 23:25:53
SCOTT@orcl_11g> select sysdate, 1/144, sysdate + 1/144 as "10 minutes" from dual
2 /
SYSDATE 1/144 10 minutes
-------------------- ---------- --------------------
30-aug-2008 23:25:48 .006944444 30-aug-2008 23:35:48
SCOTT@orcl_11g>
If I understand the documentation correctly, the second example simulates a "continuous push", not a "1 minute propagation". This is explained in the following sections:
http://download.oracle.com/docs/cd/B28359_01/server.111/b28326/repoverview.htm#sthref109
http://download.oracle.com/docs/cd/B28359_01/server.111/b28326/repplan.htm#i20874
This is not my area of expertise, but it sounds like the continuous push is what you are looking for.
[Updated on: Sun, 31 August 2008 01:41] Report message to a moderator
|
|
|
Re: problem in defining schedule push [message #344663 is a reply to message #344620] |
Sun, 31 August 2008 15:29 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
ma_rabii
Messages: 11 Registered: June 2008
|
Junior Member |
|
|
Thank you so much for your response.
I had exactly read the link that you pointed out in your respond
It says:
"If you set a value of 20 minutes for parallel propagation, then the parallel push checks once a minute. If you can afford this resource lock, then the relatively high delay_seconds value of 20 minutes is probably most efficient in your environment. If, however, you cannot afford this resource lock, then consider setting the delay_seconds value to 10 or 20 seconds. Although you must execute the jobs more often than if the value was set to 1200 seconds, you still gain many of the benefits of the delay_seconds feature (versus the default value of 0 seconds)."
As you said i need continuous push but I want to figure out that what is the best setting up in my case that i have less than 10 transaction a day but i need each site to be updated as soon as possible.
before i read the book I wanted to set up my schedule to
BEGIN
DBMS_DEFER_SYS.SCHEDULE_PUSH (
destination => 'orc2.world',
interval => 'SYSDATE + (5/24*60*60)',
next_date => SYSDATE,
delay_seconds => 0);
END;
/
which it seems every 5 seconds will update all sites
but I confronted to the continuous push subject in the book
and I hesitated that may be it is better to set the delay_seconds => 10 and parallel =>1
BEGIN
DBMS_DEFER_SYS.SCHEDULE_PUSH (
destination => 'orc2.world',
interval => 'SYSDATE + (5/24*60*60)',
next_date => SYSDATE,
delay_seconds => 10,
parallel =>1);
END;
/
Is the second setting better?
or non of them is good and
the book setting(which i can not understand why is push every one minute) as below is the better set up?
BEGIN
DBMS_DEFER_SYS.SCHEDULE_PUSH (
destination => 'orc2.world',
interval => 'SYSDATE + (1/144)',
next_date => SYSDATE,
parallelism => 1,
execution_seconds => 1500,
delay_seconds => 1200);
END;
/
do you have any idea?
|
|
|
|
|