Automatic Sync

ciaranarcherciaranarcher Posts: 28
edited July 18, 2011 6:00AM in SQL Compare Previous Versions
Hi there

I want to automatically each morning sync my local database to source control from the command line.

I have managed to get a project setup to do this for me, and after dealing with an error message (see this post: https://red-gate.com/messageboard/viewt ... e445f8140c) I selected the table to sync and saved the project, and it then did the sync from the command line. That worked.

But how do I get SQL Compare command line to detect and automatically sync ANY changes to my local database? I don't want to have to edit the project every morning :)

I'm obviously missing something here. Here is my current command:
sqlcompare /Project:"C:\Users\carcher\Documents\SQL Compare\SharedProjects\AutoUpdate-SIA.scp" /Synchronise

I currently get the message:
Error: The selected objects are identical or no objects have been selected in the comparison.

That's OK but there are no changes, but unless I selected the objects I wish to sync in the project I will ALWAYS get this message.

Please help!

Thanks,
Ciaran

Comments

  • Thanks for your post.

    If you run the project in the UI, and then on the comparison results grid check the top level 'include in synchronization' tick-box, i.e. so everything gets included, and then save the project. It should include everything when you call the project from the command line.

    I hope this helps. [/img]
    Chris
  • Hi Chris

    So once I include everything once from the UI, it will remember I included everything with the project info?

    Thanks,
    Ciaran

    Thanks for your post.

    If you run the project in the UI, and then on the comparison results grid check the top level 'include in synchronization' tick-box, i.e. so everything gets included, and then save the project. It should include everything when you call the project from the command line.

    I hope this helps. [/img]
  • Yes, I tested it out and it seemed to work.

    Let me know if you have any problems.
    Chris
  • That works great. Thanks!
Sign In or Register to comment.