sql server - MSSQL 2005 Request Mode is S and Request Type is Lock -
my problem database.i use mssql 2005 , management studio. can see blocked processes using activity monitor , there see list of blocked processes. killed process blocked using process_id time process being blocked. killing blocking continues loop. blocked process' attirubites request mode=s request type=lock , request status=grand. theere me this?
first of all, if request granted, not blocked; blocking occurs when request waiting on lock.
second, when @ process blocked which, there hierarchy, example, spid 63 blocked spid 128, spid 128 being blocked spid 98, in turn blocked spid 101. need identify last one, head of blocking chain, 1 blocking others not being blocked itself, , deal it.
here's query identify head blocker:
select r.session_id, r.host_name, r.program_name, r.login_name, r.nt_domain, r.nt_user_name, r.total_elapsed_time/1000 total_elapsed_time_sec, getdate() vrijeme, (select text sys.dm_exec_sql_text(c.most_recent_sql_handle)) sql_text sys.dm_exec_connections c inner join sys.dm_exec_sessions r on r.session_id = c.session_id r.is_user_process = 1 , exists ( select * sys.dm_os_waiting_tasks r2 r2.blocking_session_id = r.session_id ) , not exists ( select * sys.dm_os_waiting_tasks r3 r3.session_id = r.session_id )
Comments
Post a Comment