Synchronize AND save script file using command line
david.duffett
Posts: 30
I almost have continuous integration setup with TeamCity but have come up with another hitch:
I want to apply the changes to our test database from subversion (using the "/synchronize" switch), AND save the resulting script file as artifacts of the build for future reference (using the "/scriptFile" switch).
When I use both of these switches, SQLCompare tries to write to the script file twice, one for the /scriptFile switch and one for the /synchronize, and outputs an error:
Registering data sources
Creating mappings
Comparing
Applying project settings
Creating SQL
Creating SQL
Error: Unable to write migration script to file '...' because the file already exists.
Is this a bug? Is there a way for me to both synchronize and save a script file without having to run the command line twice?
I want to apply the changes to our test database from subversion (using the "/synchronize" switch), AND save the resulting script file as artifacts of the build for future reference (using the "/scriptFile" switch).
When I use both of these switches, SQLCompare tries to write to the script file twice, one for the /scriptFile switch and one for the /synchronize, and outputs an error:
Registering data sources
Creating mappings
Comparing
Applying project settings
Creating SQL
Creating SQL
Error: Unable to write migration script to file '...' because the file already exists.
Is this a bug? Is there a way for me to both synchronize and save a script file without having to run the command line twice?
Comments
I've just tried to recreate this and I was able to use both /scriptfile and /sync together.
Did you set the /force switch so that you can overwrite the existing script file?
If this doesn't help, can you post the command you are using?
Thanks a lot - now all I need to SQL Source Control to allow my devs to source control data!
http://www.red-gate.com/supportcenter/C ... aspx?p=SQL Source Control&c=SQL_Source_Control/help/1.0/SSC_Source_Controlling_Data.htm&toc=SQL_Source_Control/help/1.0/toc.htm
If you try this, you'll need the latest patched build:
http://www.red-gate.com/MessageBoard/vi ... hp?t=10917
Regards,
David
Product Manager
Redgate Software