Job fails Automatically

  • Hi All,

    We had configured a job which runs daily once. The step in the job is, it generates counts of few tables and it will store in .xls format and we are using xp_sendmail for getting the mails.

    Now the problem is often the mails wont come. Again and again we need to restart the Sql Server agent to receive the mails.

    What will be the root cause for this problem and what would be the solution for it.

    Thanks in advance.

    Regards,

    Vijay Singh.

  • Hi Vijay,

    The SQL Server Logs and the Windows Event Log would certainly have some information regarding the SQL Mail failure. Please try to post them here.

    Pradeep Adiga
    Blog: sqldbadiaries.com
    Twitter: @pradeepadiga

  • Since you posted in a 2005 forum I am assuming you are using SQL Server 2005. In SQL Server 2005 you should be using sp_send_dbmail instead of xp_sendmail. sp_send_dbmail uses SMTP not MAPI so you do not need a MAPI-client (Outlook) installed on your server.

    With sp_send_dbmail you can also use the system tables sysmail_log and sysmail_mailitems to see what has happened to mail items.

Viewing 3 posts - 1 through 2 (of 2 total)

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