auto grow

  • How can I tell when auto grow last occurred on a database?

    Thanks.

  • The only method I'm aware of is to have a Profiler trace running against your database and capture the events Database\Data File Auto Grow and Database\Log File Auto Grow.


    David R Buckingham, MCDBA,MCSA,MCP

  • Does the database file modified date change when auto grow occurs?

  • Hi,

    a quick look in Explorer tells me, the file date is yesterday 22:42. A time where no autogrow can occur, because nobody works at that time. At this time the server is restarted. I keep an eye on that.

    Cheers,

    Frank

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • Positive,

    date modified changes when an autogrow occurs.

    Cheers,

    Frank

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • How about checking the file size too, if it's larger, you know it was a grow and not a shrink?

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

  • Also, the date/time stamp of the files change when you stop/start your SQL Server (or a reboot occurs). If you have your services configured to auto-restart upon failure, that would mislead you into believing an auto-grow occurred unless you capture the size of the files as Andy Warren suggested.

    If you also have the auto-shrink option set as well, you could run into a situation where it shrinks it 2MB and then grows it 1MB (numbers arbitrary of course) before your next date/time/size capture cycle, you would be misled.

    Back to my earlier comment, the only method I'm aware of that will accurately capture the events is to use a Profiler trace.


    David R Buckingham, MCDBA,MCSA,MCP

  • Hi DRBuckingham,

    quote:


    Also, the date/time stamp of the files change when you stop/start your SQL Server (or a reboot occurs).


    that's true, but in my case no error/restart or similar occured, so it must be autogrow. But you're right this isn't a water-proof solution. More like quick'n'dirty as a starting point to dig deeper.

    Cheers,

    Frank

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • E-Mail me...

    I have a solution in place that monitors file growth and alerts me prior to it happening.

    Jeff


    "Keep Your Stick On the Ice" ..Red Green

  • I usually keep an eye on free space. Another way to see is when you notice loss of free disk space on the server. Then you can check the free space percentage on the MDF as compared to used space on the MDF. The percentage should be around the same percentage that you have set in your auto-grow property of the DB.

  • Here is a good Source code By Peter Schmitz

    http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=592&lngWId=5

    Shas3

  • Just to verify - Does the Date Time Modified only get updated when an Auto Grow takes place or when the SQL Server Service is stopped/restarted.

    Thanks.

  • Hi jrose,

    quote:


    Just to verify - Does the Date Time Modified only get updated when an Auto Grow takes place or when the SQL Server Service is stopped/restarted.


    I've never investigated on this, but it might also occur on autoshrink (which seems pretty logical to me)!

    Cheers,

    Frank

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

Viewing 13 posts - 1 through 12 (of 12 total)

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