DB mail issue

  • Hi All,

    I have created SQL JOB and configured Db mail also for respective job. My requirement is that , if the job is failed or success I should get notification mail with reason, why job has failed. There is so many job has created so I can't go and check each job history. I have setup job and I am getting notification like below:

    JOB RUN: 'Mail on login failed : State 5' was run on 3/16/2015 at 2:41:03 PM

    DURATION: 0 hours, 0 minutes, 0 seconds

    STATUS: Failed

    MESSAGES: The job failed. The Job was invoked by User . The last step to run was step 1 (Step 1 - send e-mail).

    But As per the above notification I could not find the reason behind the failure so I can go check job history and find the reason. Instead of checking job history I want to display error message here itsself.

    Can anyone please help me to resolve this issue.

    Thanks in advance.

  • This will help you with what you are looking for.

    http://www.mssqltips.com/sqlservertip/1394/how-to-store-longer-sql-agent-job-step-output-messages/


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

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

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