Compare and Sync changes (Table along with Data)
jakdba
Posts: 3
Hello Friends,
I managed to get the structure of the tables .. using SQLCompare command line , but when I am trying to sync data between db1 and db2 I am not able to achieve it.
command line using :
SQLDataCompare.exe /s1:DESKTOP-55UFSBOMSSQL14_DEV /db1:ADWorks_Dest /s2:DESKTOP-55UFSBOMSSQL14_DEV /db2:ADWorks_Dest2 /sync
Please help me understanding where am I missing. I am newbie using command line to automate the process of syncing schema's along with data.
I managed to get the structure of the tables .. using SQLCompare command line , but when I am trying to sync data between db1 and db2 I am not able to achieve it.
command line using :
SQLDataCompare.exe /s1:DESKTOP-55UFSBOMSSQL14_DEV /db1:ADWorks_Dest /s2:DESKTOP-55UFSBOMSSQL14_DEV /db2:ADWorks_Dest2 /sync
Please help me understanding where am I missing. I am newbie using command line to automate the process of syncing schema's along with data.
Comments
Thank you for your forum post.
What version of SQL Data Compare are you using?
I do not see any problems with your command line syntax, are there any error messages or exit codes that will help us locate the problem?
Many Thanks
Eddie
Senior Product Support Engineer
Redgate Software Ltd
Email: support@red-gate.com
I don't think its a error message :
Registering databases
Mapping
Comparing databases
Error: The selected objects are identical or no objects have been selected in the comparison.
I have even used the /include: Identical switch . No luck.
Thank you for reply.
Ok, this message could mean the one of the following:
1. The tables compared actually contain identical data. From the scenario you have described, I suspect that the source tables contain data and the target tables do not, which most likely means that no objects are selected in the comparison. 2. No objects have been selected in the comparison. a. For SQL Data Compare to compare rows of data, it requires a comparison key. The comparison key is automatically selected if the tables being compared contain a matching Primary Key, unique index or unique constraint. I suspect that an automatic comparison key is not available. This means that you will need to set a custom comparison key. Using the SQL Data Compare GUI, create a new project and select the data sources. Now select the 'tables & views' tab and for the tables where the comparison 'NOT SET', create a custom comparison key. Perform the comparison, when the results display, select the tables for deployment and save the project. You will need to make a change to your command line syntax, using the /project switch in place of the 's1, db1, s2 and db2' switches, for example:
b. The tables have not mapped.
Using the SQL Data Compare GUI, edit the project and select the 'Object Mapping' tab. If the tables you are comparing are not mapped between the source and target data sources, manually map the tables and save the project. Again you will need use the /project switch in place of the 's1, db1, s2 and db2' switches.
I hope the above answers your question.
Senior Product Support Engineer
Redgate Software Ltd
Email: support@red-gate.com
Does specifying the servers / databases in command line becomes meaningless if I am using a Data Compare project?