January 5, 2006 at 2:44 pm
I'm getting following error when trying to use @Query parameter in sp_send_dbmail:
================================================
Msg 14661, Level 16, State 1, Procedure sp_send_dbmail, Line 476
Query execution failed: Error initializing COM
Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command. The results, if any, should
be discarded.
=====================================================
Following is my query:
exec msdb.dbo.sp_send_dbmail
@profile_name='remotesmtp'
,@recipients='xxxxx@xxxxxxxx.com'
,@body='test'
,@query='select top 5 * from dbname.dbo.setup'
,@copy_recipients='zzzz@zzzzzzzzz.com'
,@subject='test'
January 6, 2006 at 6:01 am
Hi AJ,
Please can you confirm that you have enabled Database Mail OK and that it is JUST the @QUERY
parameter that is throwing things out for you?
Do other sp_send_dbmail
queries work?
January 6, 2006 at 7:30 am
Yes, it's only the @QUERY parameter that is throwing things out for me. No other sp_send_dbmail queries work.
Also, I forgot to add that it does work 1 out of 10 times if I keep trying.
Things seem to have stabilized after I disabled OLE Automation using SQL2005 Surface area configuration. But this means I can't use sp_OACreate function.
February 3, 2006 at 6:33 am
I have the same error when I add an attachment.
Something seems to be known by Microsoft. See http://support.microsoft.com/kb/910416
May 28, 2007 at 12:45 am
Hi ,
Do you have SP1 installed on the server? I am getting the error on the servers which are without any service pack. I'll apply SP2 and try.
May 29, 2007 at 8:19 am
I ran into the same issue, but had my network/security folks to uppade MDTCluster Firewalls-rule to allow the server and thus database_mail access to the smtp server.
May 30, 2007 at 4:56 am
I have the same issue with SQL Server 2005 with SP2 and all available post-SP2 hotfixes, i.e. build 3159.
The solution suggested by "A J" - disable OLE Automation - fixed the problem.
My messages looked like:
Msg 22050, Level 16, State 1, Line 0
Error formatting query, probably invalid parameters
Msg 14661, Level 16, State 1, Procedure sp_send_dbmail, Line 495
Query execution failed: Error Intiailizing COM . CoInitialize failed with Hresult: 0x80010106
January 15, 2009 at 1:32 pm
I was running into this on SQL 2005 SP2 and found the following, which states that Microsoft is not intending on fixing this issue:
http://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=361954
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply