Comments
5 comments
-
Hi Annette,
Thanks for your post. Assuming you are trying to run this as part of a scheduled job (i.e. in a batch file), the code in the batch file will need to look something like:@echo off "C:\Program Files (x86)\Red Gate\SQL Data Compare 9\sqldatacompare.exe" sqldatacompare /Project:"C:\Redgate\TestProject.sdc"
So, essentially you need to ensure that you specify the install path in the file.
HTH!
Pete -
That's great and is working fine. My next issue is how to get it, through the batch file, to export to a CSV? Can you help with this please or should I put this as another question?
-
No problem:
@echo off "C:\Program Files (x86)\Red Gate\SQL Data Compare 9\sqldatacompare.exe" sqldatacompare /Project:"C:\Redgate\TestProject.sdc" /export:"C:\SQLDataCompareReports\Differences.csv" /force
The /force switch overwrites any existing Differences.csv file that you have in that location. For a full list of switches available, you can CD to the install path and then run the following from the command line:sqldatacompare /Help /Verbose /Html > "C:\SQLDataCompare9_Help.html"
This should then create a file viewable in your browser of choice with a full list of switches.
HTH!
Pete -
Wow, that is absolutely fantastic and working perfectly. many many thanks.
-
You're welcome
Add comment
Please sign in to leave a comment.
The code I'm putting in the command line is:
c:\sqldatacompare /Project:"C:\Redgate\TestProject.sdc"
Any help would be gratefully received.
Thanks