Microsoft KB Archive/931175

From BetaArchive Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
Knowledge Base


BUG: Error message when you use Database Mail in SQL Server 2005: "Error 14667, Severity 16, State 1"

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:

  1. Start SQL Server Management Studio, and then connect to the instance of SQL Server 2005.
  2. In Object Explorer, locate and then right-click the following object:

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

  3. Click Modify.
  4. Locate the following line of code.

    SET @localmessage = FORMATMESSAGE(14667, convert(NVARCHAR(50), @mailitem_id))
  5. Replace the existing line of code by using the following line of code.

    SET @localmessage = FORMATMESSAGE(14667, @mailitem_id)
  6. On the Query menu, click Execute.


STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.


Additional query words: DBMail sp_readrequest FORMATMESSAGE

Keywords: kbtshoot kbbug kbprb kbexpertiseadvanced kbsql2005mail KB931175