Category: Blog

  • The Code Coverage Report

    I had someone that told me recently that they needed to find a way to get code coverage in T-SQL. Not for them, not to improve quality, but because their manager wanted a report.

    OK, here it is.

    First, build a nice SSRS report that displays your company logo, a header, the current date, and a pie chart. Yes, I know pie charts are bad, but they’re good for managers that want something like code coverage.

    Now, for the data source of the report, here’s your query:

    SELECT 90 + ((RAND() * 8)-2)

    Now, you won’t always get over 90%, which is what some people want, but you’ll get over 90 eventually.

  • Multi Script Removes 25 Database Limit

    I woke up to a Slack message that alerted me to a post in one of our channels. An engineer noted that SQL Multi Script was being upgraded today, releasing to all channels with v 1.3.3. The post alerted me to not the release, but the fact that the 25 database limit (for parallel execution) has been removed.

    Woot!!!

    That’s one I’ve been asking for across quite a few years. We don’t have a lot of Multi Script customers, but there are still quite a few and across time, I’ve had many of them ask me to remove the limit.

    Some have 30, 40, 50, 100 separate servers on which they want to run a query. Some have hundreds of databases on which they need to deploy the same code. All of them have struggled a bit with the need to run Multi Script many times to reach all their databases, with no good reason as hardware has improved and many of them have 16 GB of RAM. Back in 2007, when Multi Script was first released, most people likely had 2 or 4GB, and much slower CPUs.

    With my advocacy, and a few salespeople, plus some reorganization internally, we were finally able to press the engineers to dig into this code and remove the limit. This is good news for customers. It’s also good to have

    If you’ve never tried SQL Multi Script, give it a go. It’s a handy tool that I think is much better than a CMS. If you own a SQL Toolbelt license, you have Multi Script. If you don’t, grab a trial and see how this might help you.

  • Data Governance Survey–Still Time

    Just a reminder. Redgate is doing research into data governance, and we have a small survey we’d love to get some answers to about how you view the process inside your company.

    Take the Survey and be entered to win $100 gift card.

    If you want to read some thoughts on why we’re doing this, check out this post from the Foundry at Redgate.

    I think this will become more important over time. It’s not just GDPR in Europe, but more and more companies are getting increasing negative press and potential fines for losing data. As much as the Equifax event angers me, I’m glad there are calls for investigations, as their should be.

    No good excuse for not having strong security from all vendors, even if it slows deployment and enhancement. We can’t have data being lost to criminals this often because of misconfiguration or silly issues.

  • Remove an Active Lease on a Blob in Azure

    I was creating and dropping VMs in Azure, and found myself charged money for disks that I thought I’d deleted. I found later that deleting a VM doesn’t necessarily remove the disk blob. Here was one way that I removed some of those blobs.

    First, go to the classic portal. For some reason, the new Portal doesn’t have the capability.

    2017-06-21 21_11_07-Virtual machines - Microsoft Azure

    Click Disks

    2017-06-21 21_11_19-Virtual machines - Microsoft Azure

    At the bottom, click Delete

    2017-06-21 21_11_31-

    That removed one lease, but not others. To get rid of those, I had to do more research and searching. That process is for another post.