Template or pre+post script

JasonBSteeleJasonBSteele Posts: 2
edited September 15, 2008 10:25AM in SQL Compare Previous Versions
We put a version number and database name into a settings table.

Currently we have to change the script produced by SQL Compare by hand so that it ensures the version and name are correct before proceeding, then update the version after completion.

This ensures that the update script is not run against the wrong database. However editting the script is error prone so being able to automate the inclusion of the check and update would be very useful.

Is there a way to use a template for the script generation?

Many thanks,
Jason Steele
http://www.orchestrator.co.uk

Comments

  • Unfortunately there isn't a way of changing the script template directly. However you could easily write an application using SQL Comparison SDK that will write the script to a file, and you could edit the version number and so on during runtime.

    We have an example on the SQL Comparison SDK site that shows a HTML report produced by a SQL Compare application that uses a XLS template.

    See http://labs.red-gate.com/index.php/SQL_Comparison_SDK

    Alternatively you could use SQL Compare command line to create a SQL script output, and edit this with something like VBScript or Perl. Of course if you were really keen you could even use a DOS shell script...
    Chris Buckingham
    Red-Gate support
Sign In or Register to comment.