Topic
2 replies Latest Post - ‏2013-03-06T15:22:50Z by SystemAdmin
SystemAdmin
SystemAdmin
1143 Posts
ACCEPTED ANSWER

Pinned topic Return lock owner when a lock occurs?

‏2013-03-05T17:46:24Z |
Is there a way to have a query return the owner of a lock along with the error code? I'm using an ASP.NET application and realize that in some cases a lock is unavoidable, but would like to record both the table and the lock owner, not just the table. The idea is to be able to see where the locks are occurring, and if a particular user is repeatedly at fault address that as either a program or behavior issue.

I was able to locate a command that gets partway there (select owner from sysmaster:syslocks) but this returns a lengthy list rather than the owner of the specific row I was attempting to access. What would be ideal is a query that gets the particular lock and returns the logon (rather than the owner) of the person who has locked it. Any suggestions on how to achieve this?
Updated on 2013-03-06T15:22:50Z at 2013-03-06T15:22:50Z by SystemAdmin
  • rajendrak
    rajendrak
    3 Posts
    ACCEPTED ANSWER

    Re: Return lock owner when a lock occurs?

    ‏2013-03-06T14:55:57Z  in response to SystemAdmin
    Could you please provide some details on the data server (and version) that you are using.

    Regards,
    Raj
    • SystemAdmin
      SystemAdmin
      1143 Posts
      ACCEPTED ANSWER

      Re: Return lock owner when a lock occurs?

      ‏2013-03-06T15:22:50Z  in response to rajendrak
      Raj,

      Sure. We're using Informix 10.0.