SP_LOCK Result help

  • I'm a new db. I have a user complaining about performance problems on a qry. When I run SP_LOCK I get the below result in one of my rows. Can someone take a look at it and tell me if there is anything related to the slow running qry? Thanks!

    spiddbidObjIdIndIdTypeResourceModeStatus

    53900DB SGRANT

    53200DB[ENCRYPTION_SCAN] SGRANT

    53111311510750TAB ISGRANT

    55700DB SGRANT

    56400DB SGRANT

    57400DB SGRANT

    58700DB SGRANT

    59500DB SGRANT

    60900DB SGRANT

    61500DB SGRANT

    63700DB SGRANT

    64700DB SGRANT

    65700DB SGRANT

    66700DB SGRANT

    67700DB SGRANT

    68900DB SGRANT

    71900DB SGRANT

  • Have you looked at the execution plan of the query, what type of scan does it use ? Could you also please send I/O statistics.

  • Hey Bryan, welcome to SSC.

    First, your immediate question... the only thing of interest in what you posted is this, and there's no way we will have any idea if applicable without access to your sysobjects table.

    53 1 1131151075 0 TAB IS GRANT

    That's a Table Lock, Intent Shared... and is waiting for it (else it would just be S)

    Nothing else shows something waiting.

    You need to approach this from the other side, which is looking at the query performance and checking the waitstats for the SPID it's running on while it's running 'slowly'.

    Check out the index/tuning link in my sig if you'd like help prepping the information for us to be able to help.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • Thank you so much for replying. I'm sorry but like I said I'm a DBA Newbie. Kind of thrown in the fire by my company who went from a MS Access environment to a SQL environment. So I'm slowly learning. Didn't even know what SP_Lock was a month ago. Anyway, if it isn't too much trouble can you tell me how to get the stuff you asked for? Thanks alot if you can!

  • Bryan.avergonzado (3/8/2011)


    Thank you so much for replying. I'm sorry but like I said I'm a DBA Newbie. Kind of thrown in the fire by my company who went from a MS Access environment to a SQL environment. So I'm slowly learning. Didn't even know what SP_Lock was a month ago. Anyway, if it isn't too much trouble can you tell me how to get the stuff you asked for? Thanks alot if you can!

    Look in my signature (below), and click on this link:

    For index/tuning help, follow these directions.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply