Question regarding Management Data Warehouse

  • Hi Team,

    I have setup management data ware house for data collection...server activty, queries and disk usage, etc.

    I want to know if it's possible to setup up a job that runs weekly or monthly to send these reports to manager.

    If anyone have done it, please do share or if there is any link, please share...Thanks.

    Regards,
    SQLisAwe5oMe.

  • Hopefully someone else will give you a better answer than what I'm going to say, but I'm doing this as someone who cares.

    Stop.

    Shut down the Management Data Warehouse and look to see if you can either build your own tool or pick up an inexpensive third party one (and yes, full disclosure, I work for a vendor, but I won't mention it or link to it here). The MDW is poorly built and not in any way maintained by Microsoft. It's problematic in it's implementation and causes problems on the servers it's running against. I can't recommend it at all.

    Sorry.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

  • Grant Fritchey - Tuesday, January 9, 2018 6:42 AM

    Hopefully someone else will give you a better answer than what I'm going to say, but I'm doing this as someone who cares.

    Stop.

    Shut down the Management Data Warehouse and look to see if you can either build your own tool or pick up an inexpensive third party one (and yes, full disclosure, I work for a vendor, but I won't mention it or link to it here). The MDW is poorly built and not in any way maintained by Microsoft. It's problematic in it's implementation and causes problems on the servers it's running against. I can't recommend it at all.

    Sorry.

    Thanks Grant for your reply.  This is a small place so, not much budget on 3rd party tools.
    Anyway, I am trying to setup a new SQL job for health-check purpose using this link below.

    https://www.mssqltips.com/sqlservertip/2551/automate-sql-server-monitoring-with-email-alerts/

    I need some help fro the below query, I need to send the email to multiple recipients, how can achieve that?

    I tried something like this @recipients='test1@test.com', 'test2@test.com', 'test2@test.com', etc....but it fails.

    declare @strsubject varchar(100)
    declare @body varchar(MAX)
    select @strsubject='SQL Health Checks Completed On ' + @@SERVERNAME
    select @body='The following SQL Health Checks are Completed - Check SQL Error Log, Failed Jobs, Missing Backups, Disk Space, Server Memory, Connection Count, Batch Requests-Sec on ' + @@SERVERNAME

    EXEC msdb.dbo.sp_send_dbmail
    @from_address='test@test.com',
    @recipients='test1@test.com',
    @subject = @strsubject,
    @body = @body,
    @profile_name='test.com'

    Regards,
    SQLisAwe5oMe.

  • SQLisAwE5OmE - Wednesday, January 10, 2018 10:14 PM

    I tried something like this @recipients='test1@test.com', 'test2@test.com', 'test2@test.com', etc....but it fails.

    declare @strsubject varchar(100)
    declare @body varchar(MAX)
    select @strsubject='SQL Health Checks Completed On ' + @@SERVERNAME
    select @body='The following SQL Health Checks are Completed - Check SQL Error Log, Failed Jobs, Missing Backups, Disk Space, Server Memory, Connection Count, Batch Requests-Sec on ' + @@SERVERNAME

    EXEC msdb.dbo.sp_send_dbmail
    @from_address='test@test.com',
    @recipients='test1@test.com',
    @subject = @strsubject,
    @body = @body,
    @profile_name='test.com'

    Your recipient list should be enclosed as a single string with each recipient email address separated by a semi-colon. When you say it fails is there an error message at all?

    ...

  • Is database mail configured and is there a profile called 'test.com'?

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

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