0

I have a small problem, I am working on a project where I need to synchronize the databases to maintain the same data at diff locations, all have their own database the structure of all the database,tables,stored procedures,etc are the same. i.e. they are the copy of a single database but data is entered from different locations and I need to have data to be synchronized so that we can see the data from anywhere, will creating a windows service work?

C# code will be a nice help.

2 Answers 2

1

You can do this by two ways ..... 1st way using combination of services

i) W CF Service with windows service Or Web service with Windows Service. you will need a windows service which is installed on every client machince which will check the new data in local db and send that data to web or wcf service which will be installed on Server Machine for LAN. but if client is on network then web service or w cf service should be on Static IP Address where Server Database is installed and if client is offline in some case then u should use MSMQ or Rabbit MQ or any queuing mechanism for that ...to handle such case..

2nd way is using Replication in in sq l server 2008 go through this links:

http://www.codeproject.com/Articles/215093/Replication-in-MS-SQL-Server http://www.informit.com/guides/content.aspx?g=sqlserver&seqNum=313) Database syncronization

Sign up to request clarification or add additional context in comments.

Comments

1

Replication is what you need I guess, let SQL manage where you dont have write any code and is easy to configure.

have a look at http://www.codeproject.com/Articles/215093/Replication-in-MS-SQL-Server , or type SQL replication and there are loads of material available.

1 Comment

I have tried Replication but the snapshot was not getting initialized. do you know any reason why?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.