|
Home > Archive > SQL Anywhere Mobile > November 2005 > Sheduling synch.
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Fantom 2005-10-28, 9:24 am |
| Hi
May i scheduling synch but not in time value, but on how many change is in
database. For example i change 10 record, or i have 10 commit in database. A
in this moemnt is synch started.
How i may do this ?
Fantom
sorry but my english is very poor
| |
| Greg Fenton 2005-10-28, 11:24 am |
| Fantom wrote:
> May i scheduling synch but not in time value, but on how many change is in
> database. For example i change 10 record, or i have 10 commit in database. A
> in this moemnt is synch started.
> How i may do this ?
>
Others may think of another way, but here's one potential approach:
- run dbmlsync with a very short schedule (e.g. every 30 seconds)
- write an sp_hook_dbmlsync_del
ay stored procedure in the remote that
checks if the particular condition you are talking about has occurred
(e.g. set a "sync_now" field somewhere in the database, have the
application set the "sync_now" field when 10 records have been changed
or whatever)
- write an sp_hook_dbmlsync_end
stored procedure to unset the "sync_now"
field upon a successful synchronization
In the SQLAnywhere 8.x online docs, see:
MobiLink Synchronization User's Guide
22. Stored Procedures
Client event-hook procedures
- sp_hook_dbmlsync_del
ay
and
- sp_hook_dbmlsync_end
Hope this helps,
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/
| |
| Breck Carter [TeamSybase] 2005-10-28, 11:24 am |
| You could build your own scheduling mechanism; read about these
features in the Help:
CREATE EVENT ... TYPE GROWLOG ...
EVENT_CONDITION ( 'LogSize' )
DB_PROPERTY ( 'LogWrite' )
Breck
On 28 Oct 2005 07:10:51 -0700, "Fantom"
<szczukot@skasujto.poczta.onet.pl> wrote:
>Hi
>May i scheduling synch but not in time value, but on how many change is in
>database. For example i change 10 record, or i have 10 commit in database. A
>in this moemnt is synch started.
>How i may do this ?
>
>Fantom
>sorry but my english is very poor
--
SQL Anywhere Studio 9 Developer's Guide
Buy the book: http://www.amazon.com/exec/obidos/A...7/risingroad-20
bcarter@risingroad.com
RisingRoad SQL Anywhere and MobiLink Professional Services
www.risingroad.com
| |
| Fantom 2005-11-02, 3:24 am |
| > CREATE EVENT ... TYPE GROWLOG ...
>
> EVENT_CONDITION ( 'LogSize' )
>
> DB_PROPERTY ( 'LogWrite' )
OK, but how i may start synch in this function (CREATE EVENT ... TYPE
GROWLOG ...) ?
Fantom
| |
| Breck Carter [TeamSybase] 2005-11-02, 7:23 am |
| How about xp_cmdshell?
On 1 Nov 2005 23:46:23 -0700, "Fantom"
<szczukot@skasujto.poczta.onet.pl> wrote:
>
>OK, but how i may start synch in this function (CREATE EVENT ... TYPE
>GROWLOG ...) ?
>
>Fantom
--
SQL Anywhere Studio 9 Developer's Guide
Buy the book: http://www.amazon.com/exec/obidos/A...7/risingroad-20
bcarter@risingroad.com
RisingRoad SQL Anywhere and MobiLink Professional Services
www.risingroad.com
| |
| David Fishburn 2005-11-02, 9:24 am |
| "Breck Carter [TeamSybase]" < NOSPAM__bcarter@risi
ngroad.com> wrote in
news:uni4m1l27fuvtp1
hlo0h80jj3b2v051ltc@
4ax.com of
sybase.public.sqlanywhere.mobilink:
BC> You could build your own scheduling mechanism; read about these
BC> features in the Help:
BC>
BC> CREATE EVENT ... TYPE GROWLOG ...
BC>
BC> EVENT_CONDITION ( 'LogSize' )
BC>
BC> DB_PROPERTY ( 'LogWrite' )
An issue with this is the ASA database grows the logs 64 pages at a
time. So after it grows once there is lots of spare room and it will
not have to grow again for sometime (depending on the volume of changes
your application is making).
--
David Fishburn
Certified ASA Developer Version 8
iAnywhere Solutions - Sybase
Professional Services
Please only post to the newsgroup
Please ALWAYS include version and MORE importantly BUILD number with
EACH post (dbeng9 -v).
EBFs and Maintenance Releases
http://downloads.sybase.com/swx/sdmain.stm
Developer Community / Whitepapers
http://www.ianywhere.com/developer
CaseXpress - to report bugs
http://casexpress.sybase.com
CodeXchange - Free samples
[url]http://ianywhere.codexchange.sybase.com/servlets/ ProjectDocumentList[
/url]
| |
| Breck Carter [TeamSybase] 2005-11-03, 8:29 pm |
| Alas, it also looks like DB_PROPERTY ( 'LogWrite' ) doesn't return the
right answer, so calling it inside an ordinary scheduled event
probably won't work either.
On 2 Nov 2005 05:42:05 -0700, David Fishburn
<fishburn_spam@off.ianywhere.com> wrote:
>"Breck Carter [TeamSybase]" < NOSPAM__bcarter@risi
ngroad.com> wrote in
> news:uni4m1l27fuvtp1
hlo0h80jj3b2v051ltc@
4ax.com of
>sybase.public.sqlanywhere.mobilink:
>
>BC> You could build your own scheduling mechanism; read about these
>BC> features in the Help:
>BC>
>BC> CREATE EVENT ... TYPE GROWLOG ...
>BC>
>BC> EVENT_CONDITION ( 'LogSize' )
>BC>
>BC> DB_PROPERTY ( 'LogWrite' )
>
>An issue with this is the ASA database grows the logs 64 pages at a
>time. So after it grows once there is lots of spare room and it will
>not have to grow again for sometime (depending on the volume of changes
>your application is making).
--
SQL Anywhere Studio 9 Developer's Guide
Buy the book: http://www.amazon.com/exec/obidos/A...7/risingroad-20
bcarter@risingroad.com
RisingRoad SQL Anywhere and MobiLink Professional Services
www.risingroad.com
|
|
|
|
|