Enabling and Disabling SQL Logins

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

Views – 499

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 – 443

Find resource currently involved in blocking

Views – 412

Log-shipping Queries

First check the last file copied and restored to the secondary. Run the following queries on the secondary node. The following query…

T-SQL for identifying slow-running queries on a database

Views – 447