Generate Multiple Files with /scriptfile option
xan
Posts: 5 Bronze 1
in SQL Compare
I am calling SQLCompare from the commandline, passing in a SQLCompare project file. The project is comparing source control --> server instance.
I'm using the project file as a "release definition" by selecting the objects affected in the release I'm building in SQL Compare and then saving the project file.
Then I use the command line to build the release script /scriptfile option) and diff report (/report option).
Final commandline looks something like this:
Where I'm running this in a batch loop over all .scp files in the release folder (where the release has componants on multiple databases).
This works well and generates me a folder for each DB with a release script and diff report.
However, we find a single deployment script
1) Unwieldy
2) Hard to read and review
3) Hard to customize.
I know ideally we want to rely on the process - but for where we are right now what I'd REALLY like is, instead of a single script file "deploy.sql" containing the ordered set of changes,
1 script PER OBJECT MODIFIED containing the changes to that object, written in alphanumeric order.... ie:
001_RedGateMetaData.sql
002_Database.Schema.MyTable.sql
....
010_Migration_xxxx_.sql
is there any way to get SQL Compare to produce output like this when using the /scriptfile option - or a different option that might achieve this?
Cheers,
Alexander
I'm using the project file as a "release definition" by selecting the objects affected in the release I'm building in SQL Compare and then saving the project file.
Then I use the command line to build the release script /scriptfile option) and diff report (/report option).
Final commandline looks something like this:
"C:\Program Files (x86)\Red Gate\SQL Compare 13\sqlcompare.exe" /project:%%f /scriptfile:"%%~nf\deploy.sql" /report:"%%~nf\changes.html" /reporttype:Html /force
Where I'm running this in a batch loop over all .scp files in the release folder (where the release has componants on multiple databases).
This works well and generates me a folder for each DB with a release script and diff report.
However, we find a single deployment script
1) Unwieldy
2) Hard to read and review
3) Hard to customize.
I know ideally we want to rely on the process - but for where we are right now what I'd REALLY like is, instead of a single script file "deploy.sql" containing the ordered set of changes,
1 script PER OBJECT MODIFIED containing the changes to that object, written in alphanumeric order.... ie:
001_RedGateMetaData.sql
002_Database.Schema.MyTable.sql
....
010_Migration_xxxx_.sql
is there any way to get SQL Compare to produce output like this when using the /scriptfile option - or a different option that might achieve this?
Cheers,
Alexander
Tagged:
Answers
Unfortunately that is not possible in SQL Compare but you should raise a uservoice suggestion for it on this page: https://redgate.uservoice.com/forums/141379-sql-compare so the team can gauge demand for the functionality!
Kind regards,
Alex
Have you visited our Help Center?