PRB: Xp_sendmail with Query May Cause Deadlocks in SQLMail

Last reviewed: March 12, 1997
Article ID: Q164999
The information in this article applies to:
  • Microsoft SQL Server, versions 4.2x, 6.0, and 6.5

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


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 12, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.