Hey guys,
my customer has the problem, that they have sometimes table locks, but they never know, what they caused.
So now I am thinking about a way, how I can find out what process caused it.
Do you have a strategy, to find out such table locks?
Hey guys,
my customer has the problem, that they have sometimes table locks, but they never know, what they caused.
So now I am thinking about a way, how I can find out what process caused it.
Do you have a strategy, to find out such table locks?
No, you cannot find a locked table a month ago, not to my knowledge.
You can only try to find out which user is locking a table and then ask the user what process he/she was running.
Hey,
I already know this query, the problem is, that I would like to know, who has locked a table also one month or so ago and not in the current session. Is this somehow possible? My customer has such table locks and later they report me, they had again that issue...
Hello,
You can find out which user is blocking by starting SQL Server Management Studio, find the database and run a query with exec sp_who2
This gives a dump of all current user activity. There is a column called BlkBy, which stands for Blocked By. That gives you the SPID (SQL Process ID) of the person blocking. Find that entry for the BlkBy SPID in this list and that will give you the user who is blocking. You can ask the user what process was running. Hope this helps.
Hello,
You may want to use the community postings for this as a starter.
community.dynamics.com/.../table-locked-by-another-user
Thanks.
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,235 Most Valuable Professional
nmaenpaa 101,156