PRB: Xp_sendmail with Query May Cause Deadlocks in SQLMail

ID: Q164999


The information in this article applies to:


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.

Additional query words: block


Keywords          : kbusage SSrvGen SSrvLock 
Version           : 4.21 4.21a 6.0 6.5
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: April 9, 1999