Need SQL query to check Lockings as per below columns

  • Query to check Lock occurance--

    Need a SQl query which can show the details colums as below

    Columns Names -

    dd:hh:mm:ss:mss

    session_id

    sql_text

    login_name

    wait_info

    cpu

    etc

    Please let us know how to provide the complete query text which causes locks & which takes long time to execute??

    ************************************
    Every Dog has a Tail !!!!! :-D

  • Most, if not all of that you should be able to get from sys.dm_exec_sessions, sys.dm_exec_requests and/or sys.dm_os_waiting_tasks.

    Have a go through those DMVs, if you can't get something as you want it, ask here.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 2 posts - 1 through 1 (of 1 total)

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