Category: Query Tidbits

The “Kill” Command: What to Consider Before Stopping a SQL Server Process

Whether you’re troubleshooting on-premises SQL Server, Azure SQL DB, Managed Instance, or Amazon RDS, you will eventually encounter a “lead blocker”—that one high-cost, long-running session holding every other process hostage. While your first instinct might be to issue a KILL command, the consequences vary wildly depending on what that session is actually doing. Here is […]

How to Reset the SA Password When You Get Locked Out

Getting locked out of a SQL Server instance can happen due to a number of situations. The most common scenario I’ve encountered is when a SQL Server is moved from one domain to another without the domain being trusted or having a local SQL admin account. I recently encountered another incident where a DBA was […]

How To Restore Change Data Capture – CDC Tables When Restoring a SQL Server Database

I have recently had the privilege of working with multiple clients who have been taking advantage of Change Data Capture “CDC”. Change Data Capture is a feature that utilizes SQL Server Agent to log inserts, updates, and deletes occurring in a table. It makes these data changes available to be consumed in a relational format. […]

SQL Server Error 9002 – Full Transaction Log

A full transaction log can occur for a number of reasons. Typically it is due to the log not being truncated with regular transaction log backups, or something else not allowing the log to truncate. I often find Change Data Capture enabled and the jobs not running, SQL Server Replication in place and replication not […]

SQL Best Practices

SQL Server has evolved a great deal since I first started working with SQL Server 6.5 in 1998. Unfortunately I continually come across newer systems that are configured with old ‘best practices’. Things like 1 tempdb file per core, 1 core per socket on VMware machines, index rebuilds each night, and more. Below are some […]