Knowledge Base

How to monitor actitvity in a MS SQL Server

...and find out everything you ever wanted to know about slow queries or locks.

Prepare

Open SQL Management Studio and then in the context menu of your database server the Activity Monitor:

image2021-2-4_13-46-19.png


Overview

image2021-2-4_13-47-48.png


Blocked Processes

USE Master
GO
EXEC sp_who2
GO

A list of processes will be displayed, and any processes which are currently in a blocked state will display the SPID of the processes blocking them in the ‘BlkBy’ column.

Expensive Queries

Use the context menu to get the query text or see the execution plan

image2021-2-4_13-49-2.png


Example Query Text

image2021-2-4_13-49-59.png

Example Execution Plan

image2021-2-4_13-50-31.png