Database mail

  • Ok, got SQL server 2005 up and running, set up database mail, set up my daily maitiance plans, but i noticed that the email will only happen if there is an error, well i would like to set it up that when the maintance is done it emails my DBA group the logs so that we can verify it ran right. is this possible and if so how do i set it up?

    [font="Comic Sans MS"]Being "normal" is not necessarily a virtue; it rather denotes a lack of courage.
    -Practical Magic[/font]

  • For SQL 2005:

    Go to SQL Server Agent, find the job corresponding to your maintenance plan, right click the job, choose "Properties" and go to the "Notifications" tab. Here you can decide when to be notified ("when the job fails", "when the job completes", etc.)

  • Inside the Maintenance Plan Design Window there is a button on the toolbar called "Reporting and Logging". You can define your output there.

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

  • u can add a step to the job to send the mail u wanted.

    and adjust the last step so on success go to the new stpe u have just created.

    ..>>..

    MobashA

  • so far i have only used the wizard, i am not sure how to use the design window yet, is there a website that can help me walk thru it?

    [font="Comic Sans MS"]Being "normal" is not necessarily a virtue; it rather denotes a lack of courage.
    -Practical Magic[/font]

  • i think http://www.databasejournal.com would be helpfull.

    ..>>..

    MobashA

  • At the end of the wizard you should have the option to have the report sent to you as well.

    If you already have the plan created you can open it and then look at the toolbar as I suggested earlier. I don't know of any web pages that walk you through it. Sorry.... 🙁

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

  • i have that part enabled to send the report to me however looking at the help section on that it mentions that it sends a report if there was an error. is this true?

    [font="Comic Sans MS"]Being "normal" is not necessarily a virtue; it rather denotes a lack of courage.
    -Practical Magic[/font]

  • When I click on help for that section in the maint plan wizard I get the following as the start of the help topic;

    "Use the Select Report Options page to define a report of the task activity, and to configure the task to notify people when the task is completed. The report contains details of the steps executed by the maintenance plan. This includes any error information."

    So, it should be sent at completion and will include error information.

    Hopefully I am looking at the same spot as you are. Let me know if you see something different.

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

  • Ya after i responded to you i opened up the plan and was looking at the help that went with it, and it says what you wrote, not sure what i was reading before. hopefully it will work. i'll know when i come to work non monday. 🙂 thanks for the help

    [font="Comic Sans MS"]Being "normal" is not necessarily a virtue; it rather denotes a lack of courage.
    -Practical Magic[/font]

  • Glad to hear. That should work fine and soon you will be looking for a way to weed through all the volumes of information. 🙂

    Have a great weekend!

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

Viewing 11 posts - 1 through 10 (of 10 total)

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