Microsoft KB Archive/931175

= BUG: Error message when you use Database Mail in SQL Server 2005: &quot;Error 14667, Severity 16, State 1&quot; =

Article ID: 931175

Article Last Modified on 11/20/2007

-

APPLIES TO


 * Microsoft SQL Server 2005 Standard Edition
 * Microsoft SQL Server 2005 Developer Edition
 * Microsoft SQL Server 2005 Enterprise Edition
 * Microsoft SQL Server 2005 Standard X64 Edition
 * Microsoft SQL Server 2005 Standard Edition for Itanium-based Systems
 * Microsoft SQL Server 2005 Enterprise X64 Edition
 * Microsoft SQL Server 2005 Enterprise Edition for Itanium-based Systems

-



Bug #: 443041 (SQLBUDT)



SYMPTOMS
When you use Database Mail in Microsoft SQL Server 2005, you receive the following error message:

Error: 14667, Severity: 16, State: 1. (Params:). The error is printed in terse mode because there was error during formatting. Tracing, ETW, notifications etc are skipped.



CAUSE
This issue occurs because the sp_readrequest stored procedure uses an incorrect parameter in the following code. SET @localmessage = FORMATMESSAGE(14667, convert(NVARCHAR(50), @mailitem_id)) The correct code is as follows. SET @localmessage = FORMATMESSAGE(14667, @mailitem_id) The incorrect code causes the sp_readrequest stored procedure to end without executing the END CONVERSATION statement. Therefore, SQL Server 2005 cannot process queued messages and cannot write the Database Mail log.



WORKAROUND
To work around this issue, follow these steps:  Start SQL Server Management Studio, and then connect to the instance of SQL Server 2005. In Object Explorer, locate and then right-click the following object:

Databases\System Databases\msdb\Programmability\Stored Procedures\dbo.sp_readrequest

 Click Modify.  Locate the following line of code. SET @localmessage = FORMATMESSAGE(14667, convert(NVARCHAR(50), @mailitem_id))   Replace the existing line of code by using the following line of code. SET @localmessage = FORMATMESSAGE(14667, @mailitem_id)  On the Query menu, click Execute.</li></ol>

<div class="status_section">

STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the &quot;Applies to&quot; section.

Additional query words: DBMail sp_readrequest FORMATMESSAGE

Keywords: kbtshoot kbbug kbprb kbexpertiseadvanced kbsql2005mail KB931175

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.