Log detail error message when Block or Deadlock happens in SQL Server 2005

  • Hi! Everyone,

    I have few alert setup in SQL SERVER 2005 to capture block or deadlock. Alert sends the e-mail to my e-mail box.

    Is there any way i can captures actual sql statement or anything that causes block or deadlock?

    thanks

    aj

  • Blocks will occur constantly. Someone updating a row will block someone trying to read the row briefly. I'm not sure you want to capture blocks.

    for deadlocks, setup a trace specifically for this data. There's a deadlock event.

  • ok. that's good.

    How do I capture deadlock with alert with any sql statement or any process and send e-mail to my e-mail address?

    Basically, I want detail sql statement e-mail it my e-mail box.

  • Hi,

    I have read an article here which talks about retrieving the SQL statement during a block/deadlock.

    Have a look, this might help you about the information you are looking for.

    http://www.sqlservercentral.com/articles/Administration/63144/

    Regards,

    Pra

    ---------------------------------------------------------------------------------

  • thanks, but I still need to capture actual statement while deadlock occurred.

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

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