사용자를 확인하고 Session_ID 확인하고 죽이기…
SELECT DISTINCT
name AS database_name,
sys.dm_exec_sessions.session_id,
sys.dm_exec_sessions.program_name,
host_name,
login_time,
login_name,
reads,
writes
,Client_Net_Address as 외부IP
,Local_Net_Address as 내부IP
,last_request_start_time as 마지막쿼리시간
,resource_type
,request_mode as 락여부
FROM sys.dm_exec_sessions
INNER JOIN sys.dm_exec_Connections ON sys.dm_exec_sessions.session_id = sys.dm_exec_Connections.session_id
LEFT OUTER JOIN sys.dm_tran_locks ON sys.dm_exec_sessions.session_id = sys.dm_tran_locks.request_session_id
INNER JOIN sys.databases ON sys.dm_tran_locks.resource_database_id = sys.databases.database_id
WHERE program_name = ‘통계보기.EXE’
ORDER BY name
확인후
Kill 세션아이디
하면 됩니다.
최신 댓글