• pietlinden - Sunday, February 18, 2018 2:36 PM

    Okay, I'm not a DBA, so take this with a grain of salt.
    What if you had a table that held the size of the log over the course of the day...
    CREATE TABLE LogSizeStats (
            LogSize DECIMAL(10,2),
            TimeCheck DATETIME
    );
    GO


    Then executed something like this in a job that ran every N minutes...
    INSERT INTO LogSizeStats (LogSize, TimeCheck)
    SELECT
        GETDATE() AS LogTime
        ,(total_log_size_in_bytes - used_log_space_in_bytes)*1.0/1024/1024 AS [free log space in MB]
    FROM sys.dm_db_log_space_usage;

    Then you'd have to correlate that with what's going on on your server. What's running when - using Profiler or something like it.(Can this be done with Extended Events?)

    Then you'd just correlate the growth spikes with stored procedures etc are running just before the spike happens.

    Thanks for the suggestion! I'm actually thinking of doing something like this with sp_WhoIsActive...running it every minute or so and logging activity to help get a look into what's going on at a given period of time...

    Mike Scalise, PMP
    https://www.michaelscalise.com