Categories
T-SQL Tuesday

T-SQL Tuesday #194 – Learning from Mistakes

Part of the joy of new experiences is making mistakes and learning from them. For this month’s invitation, Louis Davidson asks us to share one of those mistakes to help others learn. The lesson I learned: don’t let order become meaning TL;DR: Don’t reuse numeric sequences for things they’re not designed for. With the prevalence of identity columns on tables, it […]

Categories
SQL

Solving Deadlocks with Application Locks

Deadlocks are an enduring feature of SQL Server. They’ve been a source of pain for many over the years and there are various ways to diagnose, mitigate or resolve them. Here I want to demonstrate approach I haven’t seen discussed – using an application lock to segregate processes. An example where I’ve used this effectively […]