What are the challenges you face when working across database platforms? Take the survey
Options

DLM Check for DB Changes before continuing

Hi,

We are using VSTS and Redgate DLM. It is working great together.

Currently we deploy our web application to two production application servers and then deploy the database changes via "Sync a database package". Before we run the database changes, we take the web application down for maintenance and then bring the web application back up after the database changes. This is because the web application may break if it tries to reference new tables etc that might not have been deployed yet. A screenshot of our current VSTS release definition is at the bottom of this article.

Just wondering if it is possible to first check if the built database (From the build definition) will actually differ from the target database. That way, if the database schemas are the same, we will not have to take down the web application and we can keep the web application up (it is load balanced, so as one server goes down, it can continue serving on the other).

If there are database changes, then we do want to continue to have the maintenance page be displayed.

40x39n4nvwr1.png

Kind regards,

Stefan
Tagged:

Comments

  • Options
    Sergio RSergio R Posts: 610 Rose Gold 5
    Hi Stefan,

    You could use the SQL Compare command line tool for this.

    You would need to unzip the NuGet package and extract the scripts folder inside (they're at db\state).

    You would then use this scripts folder as a source and would compare it against the target.

    Please note that if you are using Static data, you should use the /Include:StaticData switch.

    Thank you,
    Sergio
    Product Support Engineer
    Redgate Software Ltd
    Please see our Help Center for detailed guides on how to use our tools
Sign In or Register to comment.