Categories
SQL

Searching with Wildcard Characters

Performing a wildcard search by throwing a % into a LIKE expression is bread and butter. How do we handle this when we actually want to search for the wildcard though? This was an issue I first saw early in my career before I was even building database solutions. The business had a back office solution where you could […]

Categories
Personal

Out of the Office

I’m currently out of the office, not quite as pictured unfortunately. I’ve had quite a bit recently – for better or worse. But that’s not why we’re here. I do have a pet peeve though, and I’m sure we’ve all seen it before: Then you take a look at their profile, and it’s just as […]

Categories
SQL Server

Creating a Role for Proc Execution

We have database roles for reading and writing data but interestingly there’s no role which provides permission to execute procedures. Most DBAs I’ve worked with – production or development – prefer to use stored procedures for data access rather than an ORM. A role to allow procedure execution would be very handy. So let’s fix […]

Categories
Azure

Retaining Directory Structure in Azure Blob Storage

A hierarchy of directories which contain files. That’s how we typically think about file storage. That’s not quite the same everywhere. In Blob Storage a file can appear to be in a directory, but when it’s removed so is the directory. This can occur when using Lifecycle Management to help purge legacy blobs, which can […]

Categories
SSIS

Archiving Files with Move and Rename in SSIS

Integration workflows will typically involve handling files. As part of that we’ll need to move them around, for example moving into an archive directory. The File System Task component can be used for a variety of operations such as creating directories or copying files. Here we’re going to look at two specific operations to help […]

Categories
SQL Server

Dealing with Multiple Database Snapshots

Last week we looked at using Database Snapshots to help with rolling back upgrades. The snapshot maintained a point in time copy of the database which could be later restored. We can go further – a database can have multiple snapshots. Let’s suppose we want to take one before an upgrade, another once the upgrade is […]

Categories
SQL Server

Using Database Snapshots for Peace of Mind Upgrades

Deploying database changes are relatively easy. Where things get complicated is the rollback. Sure, it’s easy to script out and revert a procedure to a previous version, but what about destructive changes? In this post we’ll look at how we can use Database Snapshots to remove some of the headache that comes with rolling back […]

Categories
T-SQL Tuesday

T-SQL Tuesday #176 – One Piece of Advice You Wish Past You Had

This month’s invitation from Louis looks for One piece of advice you wish your past self had. T-SQL Tuesday #149 had a similar topic where we gave advice to our younger selves and I made a few points. With a little more experience, I wanted to distill a couple of those: Sharing (knowledge)is caring (for yourself) Within a business, sharing […]

Categories
Azure

Reducing Azure Function Spend with Consumption Plans

A consumption based App Service Plan in Azure provides us with a pay-as-you-go model for Function usage. This can help reduce spend from Premium plans where those plans exceed the requirements of the function, for example low volume or intermittent work. Unfortunately you can’t move a Premium plan to Consumption based via the portal. Instead […]

Categories
Azure Data Factory

Debugging Failed Function Calls in Data Factory

I recently ran into an issue when trying to call a function from an ADF pipeline. The function returned a generic Internal Server Error with no details exposed. Here we’ll look at how to dig into the logs to identify the true cause of the failure. In this instance the function was performing PGP encryption […]