x

Database Mail error

Friends,

I configured a database mail. But when i try to send a e-mail using SP_SEND_DBMAIL and the error is showed in SYSMAIL_LOG table:

After error, the status of database mail is STOPPED.

Someone can help me?

1) Exception Information =================== Exception Type: Microsoft.SqlServer.Management.SqlIMail.Server.Common.BaseException Message: The read on the database failed. Reason: The error description is 'Whitespace is not allowed at this location.'. Data: System.Collections.ListDictionaryInternal TargetSite: Microsoft.SqlServer.Management.SqlIMail.Server.Objects.QueueItem GetQueueItemFromCommand(System.Data.SqlClient.SqlCommand) HelpLink: NULL Source: DatabaseMailEngine StackTrace Information =================== at Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.QueueDataReader.GetQueueItemFromCommand(SqlCommand c) at Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.QueueDataReader.GetQueueData(Int32 receiveTimeoutSec) at Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.DataAccessAdapter.GetDataFromQueue(Int32 receiveTimeoutSec) at Microsoft.SqlServer.Management.SqlIMail.IMailProcess.QueueItemProcesser.GetDataFromQueue(DataAccessAdapter da, Int32 lifetimeMinimumSec)

2) Exception Information
===================
Exception Type: System.Data.SqlClient.SqlException
Errors: System.Data.SqlClient.SqlErrorCollection
Class: 16
LineNumber: 1
Number: 6602
Procedure: sp_xml_preparedocument
Server: 10.67.4.10\SQL_2005
State: 2
Source: .Net SqlClient Data Provider
ErrorCode: -2146232060
Message: The error description is 'Whitespace is not allowed at this location.'.
Data: System.Collections.ListDictionaryInternal
TargetSite: Void OnError(System.Data.SqlClient.SqlException, Boolean)
HelpLink: NULL
StackTrace Information
===================
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader()
at Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.ConnectionManager.ExecuteReader(SqlCommand command)

more ▼

asked Apr 30, 2010 at 02:12 PM in Default

avatar image

Felipe
262 23 23 26

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first

From the error, it looks like you have a space somewhere in either the To, CC or BCC fields of your email.

Can you post the call to sp_send_dbmail with parameters?

You may already have items in the queue that are causing this error. All emails can be removed from the system by using

EXECUTE msdb.dbo.sysmail_delete_mailitems_sp 
more ▼

answered Apr 30, 2010 at 04:16 PM

avatar image

Kev Riley ♦♦
63.8k 48 61 81

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x273
x34

asked: Apr 30, 2010 at 02:12 PM

Seen: 2336 times

Last Updated: Apr 30, 2010 at 04:21 PM

Copyright 2016 Redgate Software. Privacy Policy