Syncing data between databases

  • Hello Community!

    I am building an application that needs to pull data from an existing application. Let me explain myself. I am building an application that will run on a mobile device. We have an existing application which is the accounting module where we stored information about products, customers, manufacturers, etc. We want to be able to pull existing customers and process orders in our accounting package and read that information in the mobile application. The perfect example is the CUSTOMERS table. I want to read existing customers in my new application that exist in the accounting application. Both databases are in SQL Server 2005 Professional, and they are both in the same database server. I know I could write some stored procedure and schedule it to run every certain time, But is there a way that as soon as I create a customer in one database the data gets transmitted/synced to the other one? I would appreciate your expert advice as well as some ideas because this project may become the core of my company's profits.

    Thanks a lot!

    Ysais.

  • Hi,

    Yes it's possible. You should look at some of High Availability methods. You can use any of these methods:

    Replication - If you want to transfer the data over instantaneously in seconds

    Database Mirroring- less than <1minute

    Log Shipping- data transfer over a minute

    Further Info. Please refer BOL because this is a wider topic to discuss. any problems give us a shout....

  • Replication will synchronize two databases.

    For a mobile device, I assume you are using the compact edition of SQL running on the mobile device and that it will not be continuously connected. I also assume changes need to synchronize both directions (you can update a customer name in either application). Merge Replication is designed with this type of synchronization in mind. MSDN has video walkthroughs for setting it up and synchronizing. The setup wizard gives you the .net code needed to synchronize.

    It does, however, require GUID and TIMESTAMP columns on the tables to be synchronized. So, since you are going to have to sync to a third party database, you may have some trouble ensuring the database meets the necessary requirements.

    I would recommend you check the MSDN website and research replication.

  • Are you storing data on the mobile devices or are they connecting to a central database as needed?

    Will the shared data be changed in both applications or just the accounting application?

  • Hi Jack:

    Thank you for your response as well as the responses of the other fellow members of the community. I am building the application in MobileFrame. The mobile device syncs from a central MobileFrame server which has the database in it. This database is in SQL Server 2005 inside the MobileFrame server. In the mobile application I will update customer's information as well if needed, but according to my analysis that would be rare because to get our services customers must register and pay first. This is done on the accounting application. I am trying to provide flexibility and power to my apps. I hope this answer your questions! Thank you so much for taking the time to read my post, I really appreciate it.

    Ysais.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply