Search code examples
c#databasevisual-studiovisual-studio-2017data-comparison

Visual Studio 2017 Data Comparison, command line


I'm using this function in Visual Studio to easily sync data from one database to another

https://msdn.microsoft.com/en-us/library/aa833428(v=vs.100).aspx

You can save the Data Compare settings into a .dcmp file. Everytime I open the .dcmp file, it runs a comparison and I can press the update button to write data to DEV.

But how can I run this automatically? Is there a command line to run the .dcmp file?


Solution

  • Visual Studio 2017

    There is the Tools.NewDataComparison command.

    Visual Studio 2012-2015 (?)

    You have the Sql.NewDataComparison command. Look here.

    Visual Studio 2010

    You have the Data.NewDataComparison command, run it from devenv.
    Create a batch file if you need to automate this.
    More on NewDataComparison command here and here.