Reputation: 1353
I am the DBA for an application that uses the sp_getapplock stored procedure call to perform some specific funcitonality. Occasionally, for some unknown reason, perhaps application bug, gremlins, or other unknown error, the lock is not released. I can programmatically determine whether one of these locks is in a frozen state by looking in the application DB. I would like to call sp_releaseapplock to free the lock under certain circumstances, but I cannot figure out where the associated resource_name used in the corresponding sp_getapplock call is stored in the system DMVs.
Since the application uses a random resource name each time it is called, I cannot hardcode the sp_releaselock call. How do I determine through the DMVs the resource_name associated with an entry in the sys.dm_tran_locks table?
Upvotes: 0
Views: 95