Email the Auto-growth events that have occurred in the last 24 hours t

  • Comments posted to this topic are about the item Email the Auto-growth events that have occurred in the last 24 hours t

  • Thanks for sharing this script..

    Email does not coming if database file auto gowth disabled and pre-sized already..

    Is it correct?

  • Thank you very much for a really helpful script!

  • Hi Patrick,

    Great Script. With sys.fn_trace_gettable being deprecated and Extended Events recommended, I was wondering if you or anyone else has performed this function using Extended Events?

    Thanks,

    Gary

  • Thanks for the comment. I am yet to update the script or create a new method using extended events.

    Once i do, i will share it as well.

    If you do find one, feel free to share it as well.

    🙂

  • Thanks. Will Do!

  • Nice script!

    I wrote something similar, but with a different approach.

    My solution uses a central server for various checks and reports. One of these is on database usage: each night a script collects the defined sizes and the actual usage of all data and log devices of every database on a set of (linked) servers (using 'DBCC SHOWFILESTATS' and 'DBCC SQLPERF(LOGSPACE)').

    This records database space usage on all my SQL servers and allows me to report on database size history (for trending purposes).

    In addition, it uses the info recorded on a daily basis to email any changes in data or log device size (auto-growth or manual expansion).

    In case you're interested I can share the code.

  • By all means, please do. That's what this forum is for.

    🙂

  • akhamoshioke (9/12/2014)


    By all means, please do. That's what this forum is for.

    🙂

    I aim to rewrite my script in Powershell and submit that as an article in the near future.

  • As per your script email HTML Report not received for last 24 Hrs auto growth details. But executed successfully

    Does it means if database autogrowth disabled at database setting?

  • Hey There!

    Thanks for posting your findings;

    Let's gather some more info so we can help figure out why it didn't send the email.

    Then, execute the following statement in the msdb database to check the status of the mail queue:

    exec sysmail_help_queue_sp @queue_type = 'Mail' ;

    I am interested in the status of the messages. Please share that once you get it.

  • Thanks for reply..

    exec sysmail_help_queue_sp @queue_type = 'Mail' ;

    state: INACTIVE..

    But I have recevied backup email alert and other alerts also...

  • The auto growths for the log cause the VLF's, if you perform a large growth to the size it needs to be for workloads you will not incur a large number of VLF's.

  • Great code. I am going to set this up on all of my high profile SQL Servers. Thanks.

  • Interesting script, thanks.

Viewing 15 posts - 1 through 14 (of 14 total)

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