Command line options for script folders
Ransha
Posts: 5
Hi,
I'm using the SqlCompare command line interface (version 8.5) trying to compare and sync 2 script folders. The batch I execute is as follows:
set scripts1=C:\DB Upgrade\NewDatabaseVersion
set scripts2=C:\DB Upgrade\OldDatabaseVersion
set output=C:\DB Upgrade\SchemaUpdate.sql
SQLCompare.exe /scr1:"%scripts1%" /scr2:"%scripts2%" /sf:"%output%" /f /sync /o:Default,ForceColumnOrder
I've also tried it without the "Default" option.
The resulting script does not contain any column order enforcing code. More specifically, I have a table that I've removed and added columns to and I would like to keep the order of the columns as they appear in the table's creation script.
Any ideas?
I'm using the SqlCompare command line interface (version 8.5) trying to compare and sync 2 script folders. The batch I execute is as follows:
set scripts1=C:\DB Upgrade\NewDatabaseVersion
set scripts2=C:\DB Upgrade\OldDatabaseVersion
set output=C:\DB Upgrade\SchemaUpdate.sql
SQLCompare.exe /scr1:"%scripts1%" /scr2:"%scripts2%" /sf:"%output%" /f /sync /o:Default,ForceColumnOrder
I've also tried it without the "Default" option.
The resulting script does not contain any column order enforcing code. More specifically, I have a table that I've removed and added columns to and I would like to keep the order of the columns as they appear in the table's creation script.
Any ideas?
Ran Shani
Comments
I am not sure what you mean by "column order enforcing code" as sql server itself does not do anything in this regard and so the t-sql is not always indicative of what is happening.
I would recommend that you test the script out on a test database first and observer the changes being made on that table. If you then do not see the changes that you expect, then please let me know.
To be more specific, the case is as follows: The table has one column which was renamed (which should be interpreted to a remove and add operations while its "index" should be preserved). There's also a new column which was added at the middle and a few that were added at the end. None of these columns appear in the order they should in the modified table (after executing the script on the database).
To conclude: the ForceColumnOrder has no affect on the comparison sync script.