Q: About Replication.
From: Sky (forums_at_xact-solutions.com)
Date: 03/04/04
- Next message: Patrick Delifer: "Re: Stored Procedure help"
- Previous message: Jacco Schalkwijk: "Re: Query Between Dates"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 4 Mar 2004 15:02:54 +0100
Hi -- wish to know the simplest theory about replicating databases. I know
that SqlServer has a built in mechanism in it to do this (although never
used it) but i am looking to make a cross DBMS SQL based solution.
In essense if you have a Contacts table on the server, and you want to synch
this with 10 pocketPC's so that Users can update them in the field, how do
you design the tables?
If I use AutoIncrement columns for the index, then I believe that I will run
into trouble because the server, and each client will be auto-incrementing
at different speeds, and then to synch them back will overwrite records, and
possible gaps.
What I have come up with, but would like verification on is:
What about using a uniqueidentifier for the Key, and a DateEdited:
First Select * from SERVER.Contacts where DateEdited since
[LastTimeSynched]" and write those changes to the PDA, then reverse and
Select * from PDA.Contacts where DateEdited > [LastTimeSynched] where
Contacts.ID NOT in where NOT IN (Select GUID from SERVER.Contacts Where
DateEdited since [LastTimeSynched]...
(BTW: the exact sql for the second line is beyond me -- anyone care to
correct it so that its basically cross DBMS portable?)
Anyway -- that's what I came up with. Just feels a bit wierd and I wanted
some confirmation that this sounds like a good way to do it... Anybody have
any experience/tips?
Thanks!
- Next message: Patrick Delifer: "Re: Stored Procedure help"
- Previous message: Jacco Schalkwijk: "Re: Query Between Dates"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|