SQL Data Compare ignores table/column selection from project when called form command line
SQL Data Compare, latest version (13.6.11.8947) with Pro licence.
I have a .sdc project with some tables/columns selected and some not selected.
If I do a compare from the UI, the generated script doesn't include excluded tables/columns, which is what I expect.
But if I do the same compare from the command line, using only two switches: /Project and /ScriptFile , the generated script contains ALL changes even if the project file specifies to ignore a table/column.
The documentation states that the selection in my selection should be respected: "When you use a project, all objects that were selected for comparison when you saved the project are automatically included."
Searching the forum finds that this issue has been found (and later fixed) in a very old version of SQL Data Compare. Did this bug come back ? Forum link: https://forum.red-gate.com/discussion/15824/command-line-project-ignores-scp-settings
Thanks !
Best Answer
-
Alex_Sherby Posts: 3 New memberThanks to support the issue has been identified : I was erroneously passing the wrong project to the command line ! It turns out that if you give to the Data compare command line an SQL Compare project (SCP file) instead of an SQL Data Compare project (SDC file), no errors are given.
It was my fault, thanks to support for helping me figure it out !
Answers
The two tables you see on the left are excluded from being compared, and the UI respects that, but the command line ignores it. There are many more tables and columns excluded in the project, and some have complex WHEREs that can't be manually replicated via the command line or XML arguments file.
It'd be nice to have redgate's view on this issue. The doc states that loading from a project file works and is the way to go for complex comparaison rules. The problem is that the command line loads nothing from the project it seems.