HiveBrain v1.2.0
Get Started
← Back to all entries
debugsqlMinor

sp_send_dbmail fails when mailing queries, but no error returned, query just hangs

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
returnedmailingfailserrorqueriesjustbutquerywhensp_send_dbmail

Problem

I have an issue SQL Server 2005.

sp_send_dbmail fails when mailing out with the result of a query (inline or attatchment).

No error message is given / reported, the query just keeps executing but nothing returned (have left it for 28 minutes so far) with no time out etc.

Mails go out fine when no queries are involved.

Does anyone know how to solve this?

Solution

Is it possible that you're running on a deadlock situation? Create a test table that you know for sure no one is accessing it, populate it with some sample data, and run a query in proc against that table just to test it out.

Context

StackExchange Database Administrators Q#21606, answer score: 2

Revisions (0)

No revisions yet.