SQL Server Blocking

HKN MZ
Python in Plain English
4 min readDec 28, 2023

--

SQL Server blocking occurs when one transaction or process holds a lock on a resource (like a table or a row) and another transaction or process tries to access the same resource but is forced to wait. This waiting is due to the lock held by the first transaction, causing a blockage or obstruction for the second transaction.

Let’s create Blocking example;

Create a table and insert some data with below code.

CREATE TABLE People (
Id int IDENTITY PRIMARY KEY,
FirstName varchar(50) NOT NULL,
LastName varchar(50) NOT NULL
);

INSERT INTO…

--

--

I am writing about Sql Server, Elasticsearch and Python. İ am an Database Administrator on SQL Server and Elasticsearch more than 5+ years.