Database Mail sending fail after restoring MSDB from another server.

  • Hi all,

    Due to some unforeseen circumstances, i had to restore one of my test server's MSDB database.

    I'd used a backup of the MSDB database from one of the Live server's database because we don't usually backup system database for test servers.

    The backup process did not have any errors.

    Here's the problem: I am unable to send database mail after the restore had taken effect. I was wondering if it has anything to do with the restored contents of the live server's database.

    This is the error i am getting: "The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 3 (2009-07-24T12:46:18). Exception Message: Cannot send mails to mail server. (Failure sending mail.).

    ),7140,407,,7/24/2009 12:46:18 PM,sa"

    Anyone have any idea on how to solve this issue?

    Thanks,

    Conray

  • I guess you need to re-configure the mail as it's unable to find the mail server details.

    MSDB contains all the informations regarding jobs, history, mail, maintenance plans, Scheduling etc.

    Hence could be possible that mail is not working.

    HTH

    ---------------------------------------------------
    "Thare are only 10 types of people in the world:
    Those who understand binary, and those who don't."

  • Thank you for your reply HTH.

    I am not too sure what did you mean by mail is not working. I have tried reconfiguring it but the problem still exist. By reconfiguring, i mean deleting all the mail account/profiles, disable and enabling the DBMail service, recreating the account and tried again, but the same happens. I am gonna try the same again this weekend but do a restart and see if it will work since i cant restart the server now.

    Conray

  • Hi Beckham,

    MSDb database contains all jobs,schedule task information so when you restore MSDB from another server the old jobs you have configured will be replaced by the new one which may not work due to the difference in logins.

    You need to configure all the jobs from the scratch.

  • try this:

    stop the SQL Agent

    execute the following query:

    alter database msdb set enable_broker

    restart the SQL Agent

    Even though the Service Broker may not be installed I have found that when recovering msdb from one ser to another or even on the same server you have to do this to get the mail stuff working again. Go figure ...

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

  • Still unable to get this working..I am guessing it is because of the restored master and msdb Database that is causing this problem. I tried Rudy's suggestions but i don't think that was the solution because i already had service broker enabled..getting desperate now, 2 more weeks and the system is going lived @_@

    Or maybe.....the outgoing mail server (SMTP) is blocking my request? This is also possible, gotta check with my Exchange guy tomorrow.

  • Please try sending a test email via the GUI and post the screen shot of the error.

    Also, try sending a test email via the query window and post the ewrror as well.

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

  • I finally got it working. The problem lies at exchange server side, indeed, our exchange server was blocking my test's server mail, and so i had to register the server into exchange and all was good. Thanks to everyone who had helped!

Viewing 8 posts - 1 through 7 (of 7 total)

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