Comments
5 comments
-
Hi,
I'm sorry this appears to be undocumented. I had a look into it and comparisonkeys seems to expect the name of an index rather than a column. For instance, this works:<?xml version="1.0"?> <commandline> <server1>localhost</server1> <server2>localhost</server2> <database1>WidgetDev</database1> <database2>WidgetLive</database2> <include>Table:Widgets</include> <comparisonkeys>Widgets:PK_Widgets</comparisonkeys> <verbose/> </commandline>
...but this does not work:<?xml version="1.0"?> <commandline> <server1>localhost</server1> <server2>localhost</server2> <database1>WidgetDev</database1> <database2>WidgetLive</database2> <include>Table:Widgets</include> <comparisonkeys>Widgets:RecordID</comparisonkeys> <verbose/> </commandline>
...even though PK_Widgets is a primary key on the RecordID column. -
Hey Brian,
Thanks for the info! -
I have another question on this. There are several tables in the database which don't have a specified PK or index (I dunno, I didn't create the tables).
If I run SQL data compare through the GUI, I can manually map the column and the data copies fine. How can I achieve this using the comparisonkeys from commandline ?
For example, I am trying to copy a table called TransferCodes with these for columns:
TransferCodeID,
Code,
Source,
Dest
TransferCodeId is unique, although it does not contain an index. If I use the following comparison, the comparison fails (because it's the column name vs. index name):
<include>Table:TransferCodes</include>
<comparisonkeys>TransferCodes:TransferCodesID</comparisonkeys>
What is data compare setting differently though the GUI which is not being set through an arg file?
Jon -
I found in a previous thread that this is not possible. Can this be added as a future feature request? The new feature should take into account the following:
<include>Table</include>
<include>Table:TransferCodes</include>
<comparisonkeys>TransferCodes:TransferCodeID</comparisonkeys>
The comparison can be completed using a column name vs. index. Also, if a specific table + comparison are defined, the specified settings should be used (instead of any default setting created with the <include>Table</include> option).
Jon -
Hi,
It's certainly something we'll consider for the future, but in SDC 6 you'll now be able to use the mappings you set up in the GUI projects - so you can set up the mappings there, then use them on the command line.
Hope that helps,
Robert
Add comment
Please sign in to leave a comment.
<?xml version="1.0"?>
<commandline>
<server1>db1</server1>
<server2>db2</server2>
<include>Table:ImportStatus</include>
<comparisonkeys>ImportStatus:PlantNum</comparisonkeys>
<synchronize/>
<verbose/>
</commandline>
When using the above syntax I recv the following error:
Error: Invalid comparison keys specified for [dbo].[ImportStatus] 'PlantNum'. Only a single key or index may be specified.
Also, how do you specify multiple columns for a composite key?
Thanks.