Clear cache for a single Stored ProcedureSometimes for testing purposes (or an emergency) one might find it useful to remove query plan for a single stored procedure. This way...
RESOURCE_SEMAPHORESI know, it sounds like it could be a desert. But it's poison! You ever have one of those Saturday morning emergencies and come face to...
TSQL Tuesday: Folks Who Have Made a DifferenceToday's post was prompted by SQL On Ice. He proposed that we take this week's TSQL Tuesday to show our appreciation of people who have...
Partition Tables in SQL ServerThis post is meant to be a quick primer on Table Partitioning in SQL Server. What is it? Let's say you have a large table that is...
Build an AlwaysON Availability Group Part 2: Setting up SQL Server and Adding a DatabaseBefore we begin: While the gui/wizard for setting up Availability groups is super easy, I'm going to go through utilizing T-SQL. This...
Build an AlwaysON Availability Group Part 1: Build the Windows Failover ClusterBuild the cluster right so you don't run around frantically like this guy does for a living. So most DBA's know that AlwaysOn...
Deadlock Error HandlingAn elegant function for a more civilized age: Another way to detect deadlocks is to utilize the TRY CATCH block to raise errors in TSQL...
TriggersWhat is it? A trigger is almost like a command/function that executes automatically in response to another transaction that has executed....
Script to Kill Blocked ProcessesYou might be turning the gun on yourself if you ever have to implement this. Disclaimer: I would never suggest running this in a...
Parameter SniffingNot always optimal... What is it? Let’s say you have a parameterized proc, and it creates and caches an execution plan based on certain...