How to take a database offline

Here is one way to take a database offline. This will prevent any reads, writes or even a connection to it (including any…

Enabling and Disabling SQL Logins

Here is some simple T-SQL to enable or disable a SQL login account:

Views – 763

sql_handle vs. plan_handle

sql_handle: is the hash of the original T-SQL source. plan_handle: is the hash of the cached execution plan. The important thing to note…

A Simple Overview of a SQL Query

Here are the 4 basic steps all queries go through: 1. Parsing: The query is examined by SQL Server to syntax errors, invalid…

The the most blocked queries

Views – 784

Find resource currently involved in blocking

Views – 729