Deadlock - due to Temp Tables?

  • Luminary1975 (8/3/2016)


    The reason I'm asking is I appear to have the correct cumulative fix applied and I just got a deadlock on a temp. table... :crying:

    Now THAT'S a horse of a different color! What's the code that's involved look like?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Morning;

    The horse appears to be the same colour. 😉

    I didn't check the @@version someone else did; would appear that we do not have CU6 for SP2 so this bug is still very much alive on the server.... I checked this morning.

    I'd still be interested if anyone could shed any light on exactly what is happening, but completely understand the "if it's been fixed why worry" approach - I guess I'm more interested than concerned.

  • I tried to create similar scenario but no luck, Can any one help me to recreate same

    /************************************

    create Database Deadlock_Check

    GO

    use Deadlock_Check

    GO

    Create Procedure Deadlockproc

    as

    Begin

    Create table #emp (id int , name varchar (200))

    Insert into #emp values (1, 'deadlock')

    Alter table #emp Alter column name varchar (201)

    Insert into #emp values (2, 'deadlock')

    End

    Go

    Exec Deadlockproc

    /**********************************/

    Thanks

    Saurabh Sinha

    My Blog

Viewing 3 posts - 16 through 17 (of 17 total)

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