Run script after deployment

It would be great if I could have data compare execute sql script after successful deployment.
Is this possible?

Comments

  • AlessandroAlpiAlessandroAlpi Fidenza (PR), Italy Posts: 86 Gold 1
    hi @mortenma71,
    the "post deploy" scripts cannot be executed after the data comparison. We had the same requirements in our company and we started to apply migration scripts (feature of Sql Source Control, latest versions). With them, we inject the data creation after (or instead of) some structural change or else adding just a dedicated migration scripts with only data to send to the target environment.

    Unfortunately, this solution become not so useful if you're deploying to a multi customer environment, because in that case you need to get a script which is often different for each customer. Additionally, is completely useless if you don't have a Sql Source Control license. In this scenario, you have to make something custom (like a powershell script for comparing and, then, applying scripts) or you can use a deployment tool, like octopus deploy.

    If you don't want to buy octopus, Source Control or using PowerShell is not an option, you can let SQL Data Compare create the script for you and, then, append manually the post deploy "INSERTS" to it. So you will execute the generated script instead of comparing via tool.

    hope this helps
    Alessandro Alpi
    CTO @ Engage IT Services s.r.l.
    Database Administrator and Team Leader
    Microsoft MVP - Data Platform
    Staff member of getlatestversion.it community
    personal website | blog
Sign In or Register to comment.