SQL Server LCK_M_S only happens in production -
i have stored procedure called sql server 2012 report taking age run in production compared development because of blocking session lck_m_s
the stored procedure runs instantaneously when executed in sql server management studio , works when called part of report dev laptop via visual studio.
when report uploaded production server blocking issue appears.
how can find out causing lck_m_s
issue when in production?
execute query when problem happens again:
select * sys.dm_os_waiting_tasks t inner join sys.dm_exec_connections c on c.session_id = t.blocking_session_id cross apply sys.dm_exec_sql_text(c.most_recent_sql_handle) h1
it give spid of session caused blocking, on resource blocked, , text of rcent query session. should give solid starting point.
Comments
Post a Comment