SELECT  SPID
,       BLOCKED
,       STATUS
,       LOGINAME
,       HOSTNAME
,       DB_NAME(DBID) AS DBNAME
,       CMD
FROM [MASTER]..SYSPROCESSES
WHERE BLOCKED <> 0
OR SPID IN (SELECT BLOCKED FROM [MASTER]..SYSPROCESSES)


EXEC SP_LOCK

-- 클라이언트가 Microsoft SQL Server 인스턴스로 마지막으로 전송한 문을 표시
DBCC INPUTBUFFER(PSID)


KILL PSID