Can I track database deployments with SQL Monitor?

After a recent bout of troubleshooting a troubled deployment, using SQL Compare to determine a few schema differences between testing and production systems, I noticed that SQL Monitor very handily tracks when SQL Compare is used to modify a database that it is monitoring. There are a few articles about this sort of thing (e.g. https://www.red-gate.com/hub/product-learning/sql-monitor/unearthing-bad-deployments-sql-monitor-redgates-database-devops-tools).

What I would like to be able to do is to extend this to our automated deployment system, which is based on Octopus Deploy and not directly on Redgate's tools. If I add log an event using something similar to the SQL code shown in https://documentation.red-gate.com/sc13/getting-more-from-sql-compare/sql-monitor-integration, can I get SQL Monitor to display when the deployment occurs?

Best Answer

  • Dan BDan B Posts: 287 Gold 5
    Answer ✓
    Hi DavidKeaveny,

    That is correct if you add the same SQL to your deployment scripts then SQL Monitor will pick this up and add it to the timeline as a SQL Compare change. 

    Please do let me know if you have any further questions on this.
    Kind regards,
    Dan Bainbridge
    Product Support Engineer | Redgate Software

Answers

  • AlexYatesAlexYates Posts: 264 Rose Gold 2
    You say you handle your deployments with Octopus Deploy - that's cool. But Octopus out of the box effectively just lets you deploy a NuGet package and run a script. Typically your script would execute some other process to run your deployment.

    Most of the folks on these forums will be using Octopus to orchestrate a task with Redgate SQL Change Automation, either from a PowerShell script or using one of the Redgate community step templates. If that's what you are doing, or if you are just running the SQL Compare command line, it should show up in SQL Monitor for you automatically.

    Is that what you are doing, or are you doing something else?
    Alex Yates
    DevOps Mentor and Coach

    Director of DLM Consultants
    Creator of Speaking Mentors
    Microsoft Data Platform MVP
    Friend of Redgate
    Twitter / LinkedIn
  • DavidKeavenyDavidKeaveny Posts: 7 New member
    We are not yet to the point where we can use Change Automation, our DB development process needs to be whipped into shape first. So yes, with Octopus we are currently packaging our changes as hand-rolled (eurgh) SQL scripts then running those scripts in production; it would just be nice to be able to tag in SQL Monitor when we do that deployment.
  • AlexYatesAlexYates Posts: 264 Rose Gold 2
    Ok, in that case I'm not sure. I'll bow out and hopefully someone else can answer you shortly.
    Alex Yates
    DevOps Mentor and Coach

    Director of DLM Consultants
    Creator of Speaking Mentors
    Microsoft Data Platform MVP
    Friend of Redgate
    Twitter / LinkedIn
  • DavidKeavenyDavidKeaveny Posts: 7 New member
    Hi Dan B,

    Does SQL Monitor only support deployment marking for Redgate-based deployments (whether SQL Compare, Change Automation etc)? In other words, could I have a different icon/logo if I used slightly different text in my log event?
  • Hi David,

    There is only one choice of logo. Whether you can reverse engineer this I'm not sure but that isn't something we would be able to assist with.
    Kind regards,
    Dan Bainbridge
    Product Support Engineer | Redgate Software
  • DavidKeavenyDavidKeaveny Posts: 7 New member
    OK thanks, Dan B, I'll go with the SQL as provided in the linked articles.
Sign In or Register to comment.