SQL Server 2005 SP2 64bit Database Mail Setup Problems.

  • Hi,

    I'm having a problem setting up the database mail on an SQL Server 2005 SP2 64bit Standard Edition.

    I have turned on the Database Mail feature in the surface area configuration manager.

    When on the last page of the wizard and it's trying to apply my settings, 2 errors are displayed:

    1. Unable to create a new account, cannot insert the value NULL into column 'servername'. table 'msdb.dbo.sysmail_server'

    2. Add Mail Account to MailProfile failed.

    Any help would be greatly appreciated.

    Thanks.

  • What does SELECT @@SERVERNAME return?

    You could also try added it manually (from BOL)

    EXECUTE msdb.dbo.sysmail_add_account_sp

    @account_name = 'AdventureWorks Administrator',

    @description = 'Mail account for administrative e-mail.',

    @email_address = 'dba@Adventure-Works.com',

    @display_name = 'AdventureWorks Automated Mailer',

    @mailserver_name = 'smtp.Adventure-Works.com' ;

  • When you setup the Mail Account you did not specify a server name in the Outgoing mail server section.

  • Hi,

    thanks for the reply.

    Running the command (SELECT @@SERVERNAME) returns NULL

    I have run a modified version of the command:

    EXECUTE msdb.dbo.sysmail_add_account_sp

    @account_name = 'AdventureWorks Administrator',

    @description = 'Mail account for administrative e-mail.',

    @email_address = 'dba@Adventure-Works.com',

    @display_name = 'AdventureWorks Automated Mailer',

    @mailserver_name = 'smtp.Adventure-Works.com' ;

    And the command completed ok, but when I run the command(SELECT @@SERVERNAME) I still get NULL.

    When I try and configure the mail accounts through the wizard the account is not there.

    Is it something to do with me running 64bit as I have successfully configured database mail on a 32bit SQL Server 2005 SP3 Standard edition.

    We are looking at trying to implement the legacy SQL Mail too see if we can get that to work..

    Any other advice would be greatly appreciated, otherwise thanks for the advice you have given...

    Regards.

  • Look at http://msdn.microsoft.com/en-us/library/ms174411(SQL.90).aspx and set the server name. That may resolve your problem.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply