orphaned tracsaction

  • Hi guys

    i found very funny situation when ever i run a select or update statement contaioning three involved in joining

    when run sp_who2 i find in blk by column -2 , i donot understand why it is appering

    what was wrong and how we can fix it.

  • It's not your select that's the problem. You've got some orphaned DTC transactions that are holding locks.

    To get rid of the locks, query sys.dm_os_tran_locks for rows where the requesting session_id is -2. There's a column towards the end of the view that contains a guid, called the Unit of Work (UOW) or similar. Pass that guid as a parameter to KILL.

    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
  • i did not find that dynamic view in the master.

    still though i have mssql 2005 install

  • Sorry, os shouldn't have been there. sys.dm_tran_locks. Run it in the DB in question, not in master.

    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 4 posts - 1 through 3 (of 3 total)

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