PRB: Xp_sendmail with Query May Cause Deadlocks in SQLMail (164999)
The information in this article applies to:
- Microsoft SQL Server 4.2x
- Microsoft SQL Server 6.0
- Microsoft SQL Server 6.5
This article was previously published under Q164999 SYMPTOMS
If you run the extended stored procedure xp_sendmail with the optional
@query parameter, and the query calls xp_sendmail or causes it to be run
with a trigger again, the client process deadlocks with itself and cannot
be killed.
CAUSE
The SQLMail extended stored procedures are serialized, and can only be run
one at a time.
WORKAROUND
To work around this problem, make sure that the @query parameter does not
call xp_sendmail again, and that if data modification is done in the
query, xp_sendmail is not called by triggers on the effected tables.
MORE INFORMATION
In this situation, neither the original connection nor the loopback
connection made by SQLMail can be killed. However, the client can cancel
the query.
Modification Type: | Major | Last Reviewed: | 11/14/2003 |
---|
Keywords: | kbprb kbusage KB164999 |
---|
|