Command line - using both xml and .sdc
monkeygrind
Posts: 40
I figured I'd take the easy way out and just call my .sdc from the command line rather than re-creating all the parms in .xml. The only downside of using the project script is that while it's great for comparisons, it doesn't appear to allow more granular actions.
For instance in a project it will allow me to only compare certain columns, but then there's no way in that same project to indicate that it should only add new files and update certain columns in existing records. However this level of granularity does seem to be part of the arguments I can specify via XML.
Is it possible to combine the two, e.g. use the .sdc for the comparison arguments and the .xml for the sync arguments? Else it seems the only way to do what I want is to use the xml only.
Or am I missing something?
For instance in a project it will allow me to only compare certain columns, but then there's no way in that same project to indicate that it should only add new files and update certain columns in existing records. However this level of granularity does seem to be part of the arguments I can specify via XML.
Is it possible to combine the two, e.g. use the .sdc for the comparison arguments and the .xml for the sync arguments? Else it seems the only way to do what I want is to use the xml only.
Or am I missing something?
Comments
I believe that the issue is that the command-line tool does not respect the mappings that you had set in the .sdc project. I know that this logic is implemented specifically in the UI layer of SQL Data Compare.
This problem also affects SQL Toolkit, as it forces you to come up with some way of interperting the mapping and unmapping commands specified in the .sdc file.
I think your workaround is probably the best until we can put the table mapping logic into a lower level of the software.
So I could do something like:
<include>Table:Tabel1</include>
<include>Table:Tabel2</include>
<include ignoreadditional="false">Table:Tabel2</include>
<ignoreadditional/>
Which would apply the flag to all but the one table where it's explicitly set to false.
Sorry for the confusion.