Running from the command line does not see any differences
ov_dev
Posts: 5
I'm running the SQL Data Compare command line and having a problem in syncrhonizing script folder with a database that contains correct schema but no data. Here's my command line:
/scr1:[scripts pulled from Subversion, created by Sql Source Control]
/server2:server
/db2:CleanDb [database was built from the above script folder using SqlCompare]
/Include:identical
/ScriptFile:DataSyncScript.sql
/Force
/Verbose
When I run it says there is no differnces while in reality CleanDb is an empty database with the latest schema and script directory definitely contains static data scripts. If I do the same from the GUI it does see the differences, generates the script and inserts data into my CleanDb.
The only way I managed to sync databases from the command line is by explicitly referencing tables with the Include option.
/scr1:[scripts pulled from Subversion, created by Sql Source Control]
/server2:server
/db2:CleanDb [database was built from the above script folder using SqlCompare]
/Include:identical
/Include:mytable
/ScriptFile:DataSyncScript.sql
/Force
/Verbose
Is this the only way to synchronize the data?
This scenario is not ideal since as we add more static tables we then need to go and change our deployment script. Ideally what we want is to push all data from our source controlled tables into our clean/deployment database.
As far as I can see from the archives it use to work differently in the previous versions.
Any comments on that?
/scr1:[scripts pulled from Subversion, created by Sql Source Control]
/server2:server
/db2:CleanDb [database was built from the above script folder using SqlCompare]
/Include:identical
/ScriptFile:DataSyncScript.sql
/Force
/Verbose
When I run it says there is no differnces while in reality CleanDb is an empty database with the latest schema and script directory definitely contains static data scripts. If I do the same from the GUI it does see the differences, generates the script and inserts data into my CleanDb.
The only way I managed to sync databases from the command line is by explicitly referencing tables with the Include option.
/scr1:[scripts pulled from Subversion, created by Sql Source Control]
/server2:server
/db2:CleanDb [database was built from the above script folder using SqlCompare]
/Include:identical
/Include:mytable
/ScriptFile:DataSyncScript.sql
/Force
/Verbose
Is this the only way to synchronize the data?
This scenario is not ideal since as we add more static tables we then need to go and change our deployment script. Ideally what we want is to push all data from our source controlled tables into our clean/deployment database.
As far as I can see from the archives it use to work differently in the previous versions.
Any comments on that?
Comments
Can you let us know which build of SQL Data Compare you're using?
Redgate Software
Red Gate SQL Data Compare Command Line Utility V10.2.0.885.
What is the SDC-1480 bug? Does your bug tracking system have a public access to look it up?
A slightly earlier build (available here) shouldn't exhibit the problem until we fix it.
Redgate Software
Any timeframe when this is going to be fixed? We really need to make a decision about CI process very soon.
I don't have an ETA on that being fixed, but i'll see if I can find out.
*Edit
Another workaround is to create your selection in the GUI, and save the project. You can then call this project on the command line with the /project:somefile.sdc switch. This should work in the current version you have.
Redgate Software
This bug was from over 6 months ago and I noticed that version 10.4 has been released. Do we know if that version has the bug fix?
If version 10.4 does not have the fix, is 10.2.0.315 the last known good version? Also, do we know if this bug will be fixed in the near future as moving back a version may not be applicable for us due to the large amount of work porting over all the projects we have configured.
Any help would be greatly appreciated.
Thanks, Glen
If you're still having problems though, obviously post back with some more details and I can re-open the bug.
Redgate Software