Options

Recurring unattended data sync?

NC SoftwareNC Software Posts: 9 Bronze 2
Hello,

I haven't used SQL Data Compare Pro yet but own a license. I'd like to use it to copy data from our product server to our internal server on a recurring basis, i.e. weekly, etc. Is it possible to configure a system where we can create a job such as this and keep our local database in sync with the production database?

Any guidance would be appreciated.

Thank you.

Neal

Comments

  • Options
    Hi Neal,

    This is indeed possible. If you create a batch file to run SQL Data Compare, you can then set this to run however often you want using Windows Scheduler.

    An example batch file that would synch your databases as well as create a report on the differences and generate the SQL script that was run would be something like:

    @echo off
    "C:/Program Files (x86)\Red Gate\SQL Data Compare 8\sqldatacompare.exe" sqldatacompare /db1:WidgetDev /db2:WidgetLive /s1:"ts-pete\sql2008" /s2:"ts-pete\sql2008" /Synch /Export:"C:\Users\peter.peart\Documents\SQL Data Compare\Command Line Reports\ResultSet1" /force /sf:"C:\Users\peter.peart\Documents\SQL Data Compare\Command Line Reports\SynchScript\SynchScript.sql"

    A full list of switches though can be found by navigating through CMD to the SQL Data Compare program file, and then running:

    sqldatacompare /? /verbose

    Or to output this to an HTML file:

    sqldatacompare /? /verbose /html >"C:\Users\peter.peart\Documents\SQL Data Compare\Command Line Help.htm"

    Pete
    Peter Peart
    Red Gate Software Ltd
    +44 (0)870 160 0037 ext. 8569
    1 866 RED GATE ext. 8569
  • Options
    Thank you Pete. I guess a "SQL Sync" would be a nice product for the intent of my inquiry. I just need to keep a backup server in sync with a production server which use the SIMPLE recovery model. I guess I could look into programming this myself using the Microsoft Sync Framework but it would be nice if you had something already baked.

    I'll investigate what you offered and see if it will work for me. Thank you.
Sign In or Register to comment.