Hi,
Did somebody know if I can set an Email alert in SQL Server when some
connection is block by somebody else?
Thanks,
SylvieIt is difficult to setup an alert for this condition as no error will be
raised by default. With the default lock timeout the connection will just
continue to wiat, until it acquires the resource, or until the application
timeout comes into affect.
However, you can setup a stored procedure, to continually monitor sp_who
output, or master..sysprocesses table and send emails out, if you see
excessive blocking. You could send email from a stored procedure, using SQL
Mail or sp_smtp_sendmail. See SQL Server Books Online for more info on SQL
Mail. Check out sqldev.net for info on sp_smtp_sendmail.
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"Sylvie" <sylvie.mondoux@.fjordinteractif.com> wrote in message
news:eRo2xMlpEHA.536@.TK2MSFTNGP09.phx.gbl...
Hi,
Did somebody know if I can set an Email alert in SQL Server when some
connection is block by somebody else?
Thanks,
Sylviesql
No comments:
Post a Comment