SP_Lock Help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Frank Py

    SP_Lock Help

    I am wanting to learn how to diagnose locking problems on a query by
    looking at locking data in SP_Lock and not SQL Profiler. Books on line
    describes what each column means, but I would like an example to know
    what actions to take if I find 2 SPIDs competing for resources. For
    example, should I kill one or the other or do something else altogether.

    Help appreciated. Thanks.
    Frank



    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
  • Vincento Harris

    #2
    Re: SP_Lock Help

    Frank Py <fpy@proactnet. com> wrote in message news:<3f9e8e14$ 0$197$75868355@ news.frii.net>. ..[color=blue]
    > I am wanting to learn how to diagnose locking problems on a query by
    > looking at locking data in SP_Lock and not SQL Profiler. Books on line
    > describes what each column means, but I would like an example to know
    > what actions to take if I find 2 SPIDs competing for resources. For
    > example, should I kill one or the other or do something else altogether.
    >
    > Help appreciated. Thanks.
    > Frank
    >
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it![/color]

    You can tell which users are concerned from the loginame and hostname
    field.
    Call them ask what they are doing and then you could have permission
    to kill
    their sessions.Someti mes the tables with frequent locks are almost
    always indexed poorly
    or the indexes need rebuilt.In my case sometimes the tables have had a
    couple of million rows and this helped the users delete some of the
    rows

    HTH
    Vince

    Comment

    • Vincento Harris

      #3
      Re: SP_Lock Help

      Frank Py <fpy@proactnet. com> wrote in message news:<3f9e8e14$ 0$197$75868355@ news.frii.net>. ..[color=blue]
      > I am wanting to learn how to diagnose locking problems on a query by
      > looking at locking data in SP_Lock and not SQL Profiler. Books on line
      > describes what each column means, but I would like an example to know
      > what actions to take if I find 2 SPIDs competing for resources. For
      > example, should I kill one or the other or do something else altogether.
      >
      > Help appreciated. Thanks.
      > Frank
      >
      >
      >
      > *** Sent via Developersdex http://www.developersdex.com ***
      > Don't just participate in USENET...get rewarded for it![/color]

      You can tell which users are concerned from the loginame and hostname
      field.
      Call them ask what they are doing and then you could have permission
      to kill
      their sessions.Someti mes the tables with frequent locks are almost
      always indexed poorly
      or the indexes need rebuilt.In my case sometimes the tables have had a
      couple of million rows and this helped the users delete some of the
      rows

      HTH
      Vince

      Comment

      Working...