Testing Activity

  • If i run this command

    BEGIN TRANSACTION

    UPDATE AdventureWorks.Person.StateProvince

    SET IsOnlyStateProvinceFlag = 1

    WHERE IsOnlyStateProvinceFlag = 0

    Without out COMMIT then look in activity - you see it says sleeping. I knew it was doing something as it was not finished in query analyzer....The only way i saw was that the open transactions was greater than 0.

    Usually i look for the status not sleeping.

    If i looked in standard reports - Top transactions by lock counts - nothing appears, top connections...nothing shows me that this session is still going to run.

    At what stage would this session actually die and abort itself.

    Lets say someone did forget to issue the commit

    What would be the best command to see to run to actually see what not been committed.

  • select * from sysprocesses where open_tran = 1

    Or

    Select B.text, A.* from sys.sysprocesses A

    cross apply sys.dm_exec_sql_text(sql_handle) as B

    where open_tran = 1

  • Thanks...

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

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