What is a Blocking in SQL Server | Find blocking and troubleshooting steps | SQL Interview Q&A

preview_player
Показать описание
Blocking is completely normal in SQL Server. You will typically be unaware of the many short blocks happening all the time.

Sometimes, blocks take longer than expected to resolve. Blocks of longer duration can create chains, where a blocked process blocks additional processes and so on. This type of blocking scenario is problematic.

The concern is not with blocking, but rather excessive blocking.

Video links below.
*What is Locking in SQL Server

*Locking Resources in SQL Server

*Locking modes in SQL Server

*Microsoft Documentation on Blocking

*sp_Whoisactive documentation link(to download stored procedure)

--T-SQL scripts used in this video
**UPDATE in spid 52
begin tran
update table1
set Id = 6201
where Ext = 122

**in spid 54
select * from table1

select request_session_id, request_mode, request_type,
resource_type, resource_description

select session_id, wait_duration_ms, wait_type,
blocking_session_id, resource_description

select session_id, status, wait_time, wait_type, wait_resource, command

sp_whoisactive @get_locks = 1

dbcc inputbuffer(52)

sp_who2 active

kill 52

EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;
EXEC sp_configure 'blocked process threshold', 5
RECONFIGURE;
Рекомендации по теме
Комментарии
Автор

thank you for the practical information

tahirhanyildizoglu
Автор

Well, explanatory. Thank you, sir, 👍👍👍👍👍

tonyettah
Автор

Hello sir aap bahut accha padhate hai thank you so much

shyamdular
Автор

Very helpful and well explained. Thank you.

burropoco
Автор

very helping sir, thank you, much appririate, do the more videos on this

Chinnurockbells
Автор

Hi sir your vidio is soo useful👏👏👏👏👏👏👏👏

shivachithambaram
Автор

need session on performance tuning and also how to identify cpu and memory issues

harithad
Автор

brother can you make a complete video about migration ms SQL?

hanumatharaonisankarao
Автор

U doing such an amazing job sir, I have one request kindly please make a video that once we become sql dba after that how we can grow and which technology can help us for career growth as well income growth or you can reply on my comment .
In advance thank you so much u doing such an Amazing work 💗

tarunbisht
Автор

while i am executing sp_whoisactive it shows we cant find a storedprocedure

sivasankar
Автор

Hi can you please share the SQL dba real-time interview questions for senior candidates .

devakumar
Автор

Hi, please make the video about SQL architecture.

harithagolla
Автор

Hi Bro,
Mee videos almost chustunna
Mee laptop configuration enti
4 VMs install chesina Mee laptop Baga fast ga work avutundi, Please suggest best laptop

RaviKiran-sfns