Sorry for a long post but I'm not very good in english and so cannot
describe my problem in any other way. Please bear with me.
I'm trying to implement a solution that requires data synchronization
across multiple locations. My application will be running on various
branches of a company. These branches are not connected to each other.
Each branch will have their own local SQL Server with the complete
data. Each branch will have full access to data (insert /
update/edit/delete). Periodically the data across all branches will
need to be synchronized (offline via export and import). Any ideas on
how I can achieve this?
Right now what I have in mind is this:
My Application is generating the primary keys for all the tables (like
customers, orders etc.) Here I have ensured that the primary across all
branches will remain unique by prefixing the branchcode (2 characters)
to the primary keys in all tables. All tables also have a CreatedOn
and UpdatedOn fields (datetime). Now for synchronizing data from
Branch A to Branch B, I will export the data from branch A into a MS
Access database. And then I will import it into branch B. While
importing, the application will check each record in the SQL Server. If
the record is not present then it will insert it into SQL Server. If
the record is present and the SQL Server data is older, it will update
with the Access record. If the data in SQL Server is newer then
the record will be skipped.
I hope I have been able to convey what I'm trying to do.
In theory, this seems to be an OK solution but I think a lot of work
will go into this (specially for conflict resolution).
Is there any other (better) way to implement what I'm trying to do? I
have heard about replication, but I'm not sure if it will be useful in
my case. Are there any built-in features in SQL that I can use to for
this kind of offline synchronization?
Any help or pointers would be very appreciated.
Thanks in Advance,
Anoushka
replication requires a link between the two nodes.
You will have to cobble together something like what you are talking about,
if you don't have a network connection.
"Anoushka" <anoushka.jones@.gmail.com> wrote in message
news:1095829976.948995.199280@.h37g2000oda.googlegr oups.com...
> Hi All,
> Sorry for a long post but I'm not very good in english and so cannot
> describe my problem in any other way. Please bear with me.
> I'm trying to implement a solution that requires data synchronization
> across multiple locations. My application will be running on various
> branches of a company. These branches are not connected to each other.
> Each branch will have their own local SQL Server with the complete
> data. Each branch will have full access to data (insert /
> update/edit/delete). Periodically the data across all branches will
> need to be synchronized (offline via export and import). Any ideas on
> how I can achieve this?
> Right now what I have in mind is this:
> My Application is generating the primary keys for all the tables (like
> customers, orders etc.) Here I have ensured that the primary across all
> branches will remain unique by prefixing the branchcode (2 characters)
> to the primary keys in all tables. All tables also have a CreatedOn
> and UpdatedOn fields (datetime). Now for synchronizing data from
> Branch A to Branch B, I will export the data from branch A into a MS
> Access database. And then I will import it into branch B. While
> importing, the application will check each record in the SQL Server. If
> the record is not present then it will insert it into SQL Server. If
> the record is present and the SQL Server data is older, it will update
> with the Access record. If the data in SQL Server is newer then
> the record will be skipped.
> I hope I have been able to convey what I'm trying to do.
> In theory, this seems to be an OK solution but I think a lot of work
> will go into this (specially for conflict resolution).
> Is there any other (better) way to implement what I'm trying to do? I
> have heard about replication, but I'm not sure if it will be useful in
> my case. Are there any built-in features in SQL that I can use to for
> this kind of offline synchronization?
> Any help or pointers would be very appreciated.
> Thanks in Advance,
> Anoushka
>
|||Hello Hilary,
Thanks for the reply. I am ready to "cobble together" the solution
that I described

wanted to make sure that it is absolutely the most elegant way (if we
can call it that!) to do it.
I have never implemented replication of any kind so I wasn't sure.
Thanks once again,
Anoushka
No comments:
Post a Comment