How to determine last time log growth happened

  • I want to determine the last time a database (the tempdb) experienced an increase in the data file size. Is there a way to determine the day/time when it grew?

  • Going forward you can use profiler to capture the time when the growth happens but I'm not sure if there are any views you can use to see when it grew historically

  • Yeah.. I am looking for a method without a baseline, profiler, etc. I can set it up going forward, but I am trying to identify a possible correllation between an error that occurred and database file growth, so I need to figure it out historically.

  • I don't believe this kind of info is kept historically, unless there's some custom monitoring in place.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Found the answer (from another forum) and thought I would post. With SP2 you can right click and select reports on a database, and select the disk usage report. It has growths as an item/subreport to expand.

    Not exactlly a query.. but close enough for me.

  • That reads out of the default trace.

    If you're not trying to go too far back in time, it will work. The trace is limited to 5 files of 20 MB each and older events are overwritten by newer once all the files are full. It depends on the activity of the DB how far back the trace reaches.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Good to know that it is limited and the source for the data. For my issue it suffices.

  • dmc (9/17/2008)


    I want to determine the last time a database (the tempdb) experienced an increase in the data file size. Is there a way to determine the day/time when it grew?

    If you are interested in data-file growth, the DMV sys.dm_db_file_space_usage gives you info for tempdb only:

    http://msdn.microsoft.com/en-us/library/ms174412(SQL.90).aspx

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

Viewing 9 posts - 1 through 8 (of 8 total)

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