sp_locks

  • Is there any way to set an alert which will send an email if processes have locks for more than 4 mins.?

    Also, I need to find out any locks that were exists few hours back. How to find this?

    Please help...

  • You need to write a custom script and send an email based on the criteria.

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • After you write your script to send the email, write the detail to a table so you can review it later in case you miss it. I have a very clunky way of doing this, but there's probably a nicer version here somewhere.

  • How about following:

    SQL SERVER AGENT --> Alerts -->SQL Server Perfomance condition for alert type --> Under Performance condition alert definition --> locks under OBJECT --> Under Counter select lock wait time -->if Counter select rises above and then value.

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

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