We recently upgraded SQL Server 2005 to SP 2 and now cannot implement Database mail. The message given is "Activation Failure" in the log. I have looked at the stored procedure "sp_sysmail_activate" and there is apparently a failure due to an invalid parameter. Can someone provide some direction regarding how to proceed?
Thanks.
could u pse post back the exact error from error log
Madhu
|||Date 5/30/2007 9:36:02 AM
Log Database Mail (Database Mail Log)
Log ID 516
Last Modified 5/30/2007 9:36:02 AM
Last Modified By sa
Message
Activation failure.
I hope this helps.
Thank you.
|||We have also recently upgraded to sql 2005 sp2 and are experiencing the same error.
Log Database Mail (Database Mail Log)
Log ID 139
Last Modified 6/7/2007 12:50:06 PM
Last Modified By sa
Message
Activation failure.
Does anyone have any suggestions on what be causing this problem and potential solutions.
Thanks
|||FYI - I was trying to make this work on SQL Server Express and was getting the same error message.
This might be because it's not supported, according to: http://msdn2.microsoft.com/en-us/library/ms165636.aspx
I don't know, but thought I would share.
Cheers,
-Richard
|||DBMail is not supported on the Express edition. Let me know if you're receiving this error for a !Express edition.
Cheers,
Dan
|||Did you have any luck with your database mail issue. I'm experiencing the same thing.|||Hi,
I'm also having this issue - See here for my problem:
http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=1890943&SiteID=17
Wonder if anyone has a solution ?
Cheers
|||We just upgraded to SQL2005 SP2 and since database mail will not function here as well. Any solutions to this issue?
Database Mail Logs:
Date 8/3/2007 7:00:07 PM
Log Database Mail (Database Mail Log)
Log ID 1646
Last Modified 8/3/2007 7:00:07 PM
Last Modified By sa
Message
Activation failure.
EventVwr Logs:
Event Type: Information
Event Source: MSSQLSERVER
Event Category: (2)
Event ID: 9724
Date: 8/6/2007
Time: 8:00:06 AM
User: N/A
Computer: SERVERNAME
Description:
The activated proc [dbo].[sp_sysmail_activate] running on queue msdb.dbo.ExternalMailQueue output the following: 'Error executing extended stored procedure: Invalid Parameter'
|||same problem here, anyone any ideas please?|||
Same to...
Additional information: after runnig DatabaseMail90.exe manualy, at DataBaseMailLog I have 2 errors:
Code Snippet
Date 21.09.2007 15:04:58
Log Database Mail (Database Mail Log)
Log ID 224
Last Modified 21.09.2007 15:04:58
Last Modified By WEST\freeman
Message
Invalid XML message format received on the ExternalMailQueue. conversation_handle: 408F6968-3268-DC11-8ADE-0015171170E8. message_type_name: {//www.microsoft.com/databasemail/messages}SendMailStatus. message body:
http://schemas.microsoft.com/databasemail/responses ResponseTypes.xsd" xmlns:responses="http://schemas.microsoft.com/databasemail/responses">
Code Snippet
Date 21.09.2007 15:04:58
Log Database Mail (Database Mail Log)
Log ID 225
Process ID 2032
Last Modified 21.09.2007 15:04:58
Last Modified By WEST\freeman
Message
1) Exception Information
===================
Exception Type: System.Data.SqlClient.SqlException
Errors: System.Data.SqlClient.SqlErrorCollection
Class: 16
LineNumber: 1
Number: 6602
Procedure: sp_xml_preparedocument
Server: .
State: 2
Source: .Net SqlClient Data Provider
ErrorCode: -2146232060
Message: The error description is 'Switch from current encoding to specified encoding not supported.'.
The XML parse error 0xc00ce56f occurred on line number 1, near the XML text "<?xml version="1.0" encoding="utf-16"?>".
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.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
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.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.DataAccessAdapter.PostResponse(Response r, Guid convHandle)
at Microsoft.SqlServer.Management.SqlIMail.IMailProcess.ThreadCallBack.PostResponseIfNeeded(MailInfo mi, Response r)
at Microsoft.SqlServer.Management.SqlIMail.IMailProcess.ThreadCallBack.MailOperation(Object o)
Forgot
After runnig DatabaseMail90.exe manual leters from DatabaseMail query will sent.
|||Why this happndes, i don't now. But solution is found/
This hapend, couse you stored proc msdb.dbo.sp_sysmail_activate is older, and mismatches procedure xp_sysmail_activate in databe master.
Run this code to update the sp_sysmail_activate proc.
sp_sysmail_activate
USE [msdb]
GO
/****** Object: StoredProcedure [dbo].[sp_sysmail_activate] Script Date: 09/27/2007 15:46:33 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- sp_sysmail_activate : Starts the DatabaseMail process if it isn't already running
--
ALTER PROCEDURE [dbo].[sp_sysmail_activate]
AS
BEGIN
DECLARE @.mailDbName sysname
DECLARE @.mailDbId INT
DECLARE @.mailEngineLifeMin INT
DECLARE @.loggingLevel nvarchar(256)
DECLARE @.loggingLevelInt int
DECLARE @.parameter_value nvarchar(256)
DECLARE @.localmessage nvarchar(max)
DECLARE @.readFromConfigFile INT
DECLARE @.rc INT
SET NOCOUNT ON
EXEC sp_executesql @.statement = N'RECEIVE TOP(0) * FROM msdb.dbo.ExternalMailQueue'
EXEC @.rc = msdb.dbo.sysmail_help_configure_value_sp @.parameter_name = N'DatabaseMailExeMinimumLifeTime',
@.parameter_value = @.parameter_value OUTPUT
IF(@.rc <> 0)
RETURN (1)
--ConvertToInt will return the default if @.parameter_value is null or config value can't be converted
--Setting max exe lifetime is 1 week (604800 secs). Can't see a reason for it to ever run longer that this
SET @.mailEngineLifeMin = dbo.ConvertToInt(@.parameter_value, 604800, 600)
EXEC msdb.dbo.sysmail_help_configure_value_sp @.parameter_name = N'ReadFromConfigurationFile',
@.parameter_value = @.parameter_value OUTPUT
--Try to read the optional read from configuration file:
SET @.readFromConfigFile = dbo.ConvertToInt(@.parameter_value, 1, 0)
--Try and get the optional logging level for the DatabaseMail process
EXEC msdb.dbo.sysmail_help_configure_value_sp @.parameter_name = N'LoggingLevel',
@.parameter_value = @.loggingLevel OUTPUT
--Convert logging level into string value for passing into XP
SET @.loggingLevelInt = dbo.ConvertToInt(@.loggingLevel, 3, 2)
IF @.loggingLevelInt = 1
SET @.loggingLevel = 'Normal'
ELSE IF @.loggingLevelInt = 3
SET @.loggingLevel = 'Verbose'
ELSE -- default
SET @.loggingLevel = 'Extended'
SET @.mailDbName = DB_NAME()
SET @.mailDbId = DB_ID()
EXEC @.rc = master..xp_sysmail_activate @.mailDbId, @.mailDbName, @.readFromConfigFile,
@.mailEngineLifeMin, @.loggingLevel
IF(@.rc <> 0)
BEGIN
SET @.localmessage = FORMATMESSAGE(14637)
exec msdb.dbo.sysmail_logmailevent_sp @.event_type=3, @.description=@.localmessage
END
ELSE
BEGIN
SET @.localmessage = FORMATMESSAGE(14638)
exec msdb.dbo.sysmail_logmailevent_sp @.event_type=0, @.description=@.localmessage
END
RETURN @.rc
END
|||Also you must change this stored/procs:
msdb.dbo.sp_send_dbmail
msdb.dbo.sp_ExternalMailQueueListener
msdb.dbo.RunMailQuery
msdb.dbo.sysmail_verify_account_sp
msdb.dbo.sp_validate_user
Take it from worked server.
|||I get this error too on standard edition SP2.
Has anyone reported this as a bug?
No comments:
Post a Comment