Locking in SQL Server
This video is a brief information about locking in SQL server: what is locking, how many types are there and how do they work.
Agenda:
1. What is locking?
2. Why do we need locking?
3. Major locking types and how they work (with live demo)
To check blocking sessions, use:
SELECT
request_session_id,
resource_type,
resource_description,
request_mode,
request_type,
request_status
FROM sys.dm_tran_locks
SELECT
session_id,
wait_duration_ms,
wait_type,
blocking_session_id,
resource_description
FROM sys.dm_os_waiting_tasks
SELECT
session_id,
status,
wait_type,
wait_time,
wait_resource,
command
FROM sys.dm_exec_requests
📚 ►Full course on Troubleshooting sessions: https://youtube.com/playlist?list=PLxuuX6jGq7kmlUblaWyfIh-iT5r0EWrJX&si=gC5FAhH9i6_b0waY
📷 ►Follow me on Instagram - https://www.instagram.com/arslanov_boburmirzo?igsh=OGQ5ZDc2ODk2ZA%3D%3D&utm_source=qr
🧑💼►Follow me on LinkedIn - https://www.linkedin.com/in/bobirmirzo-arslanov-548960173
Watch all my playlists here:
🚀►Full course on Encrypting connections to SQL Server- https://youtube.com/playlist?list=PLxuuX6jGq7kmqOCqYa1lFxQOKFgTfb8j8&si=bBwHhLsu6m5CjFft
🚀 ►SQL Server replication session: https://youtube.com/playlist?list=PLxuuX6jGq7km5E54qm0zc7REGXw6WD4C8&si=fQ_PVoGQ1S8SeI6X
🚀 ►SQL Server Always On Availability Group: https://youtube.com/playlist?list=PLxuuX6jGq7klnjr9OIGt8R1SN76pQzuEB&si=zZVr_sJnc7I9H8d3
🚀 ► SQL Server internals: https://youtube.com/playlist?list=PLxuuX6jGq7kk5_OkxbZ8QDZ2HFBDy2XZ2&si=U2rRfgS2y87t5SU4
🚀 ► Course in On-memory OLTP: https://youtube.com/playlist?list=PLxuuX6jGq7kmt6gfHUW5KhfXGaoSiDXOB&si=fVS1s2L6If36Zg-r