reasons for a truncate taking forever

  • We had a DTS process that would truncate a table in 10 secs or less.  For some reason, the truncate is now taking 7 hours.  Other than a lock on the table, what would cause a truncate to take this long?

    Thanks for any advise...

  • Is it a true Truncate, or are you using DELETE ?

     

  • it is a truncate

  • Probably there is some resource that is acquiring lock on the table which is preventing the truncate statement on the table.

    You may debug using SQL Profiler to verify if there are locks being held.

    --Kishore

  • Before going in too deep with 'profiler', why don't you try using:

    sp_who

    sp_lock

    sp_who2

    sp_lock2

     

    It may be something really obvious.

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

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

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