Lock in SQL Server

SELECT GETDATE() AS Data ,blocked.session_id AS [Sessione ID Bloccata] ,blocked.command AS [Command Bloccata] ,blocked.wait_type AS [Tipo Lock] ,txtBlocked.TEXT AS [Query SQL Bloccata] ,bloccking.session_id AS [Sessione ID Bloccante] ,bloccking.nt_user_name AS [Utente Bloccante] ,txtBlocking.TEXT AS [Query SQL Bloccante] FROM sys.dm_exec_requests blocked INNER JOIN sys.dm_exec_sessions bloccking ON blocked.blocking_session_id = bloccking.session_id LEFT JOIN sys.sysprocesses AS prc ON prc.spid = bloccking.session_id CROSS APPLY sys.dm_exec_sql_text(blocked.sql_handle) AS txtBlocked CROSS APPLY sys.dm_exec_sql_text(prc.sql_handle) AS txtBlocking

Torna su
Categoria

SQL SERVER (986)


Autore

Marco Cecchetti


Data pubblicazione.

22/03/2021



Recensioni

Articolo non ancora recensito