• Great set of scripts! But...I am having one issue and I want to see if anyone else is having the same problem.

    The problem I am having is with the IndexOptmize Procedure. For my FragmenationMedium_LOB and Medium_NonLob (between 10%-30%) I run the index reorganize. But for some reason my ldf file is growing out of control. My understanding of the reorganize feature is it doesn't have that kind of an impact on your log file. Before anyone hammers me, it is not the transaction log that is growing. Yes, after this runs I do have a large transaction log file, but the one right after that one is ok. It is just the ldf that is growing.

    Database mdf file is around 25 gig

    Database ldf file will start at 1.5 gig and grow to almost 40 gig in 4 or 5 days.

    I am growing the file in 500MB inc.

    RecoveryModel: Full

    Also I am logging the output of this script and it has never reached a rebuild point over 30% its always a reorganize.

    Here are my options set in the IndexOptimize Script.

    @databases nvarchar(max),

    @FragmentationHigh_LOB nvarchar(max) = 'INDEX_REBUILD_OFFLINE',

    @FragmentationHigh_NonLOB nvarchar(max) = 'INDEX_REBUILD_OFFLINE',

    @FragmentationMedium_LOB nvarchar(max) = 'INDEX_REORGANIZE_STATISTICS_UPDATE',

    @FragmentationMedium_NonLOB nvarchar(max) = 'INDEX_REORGANIZE_STATISTICS_UPDATE',

    @FragmentationLow_LOB nvarchar(max) = 'NOTHING',

    @FragmentationLow_NonLOB nvarchar(max) = 'NOTHING',

    @FragmentationLevel1 int = 10,

    @FragmentationLevel2 int = 30,

    @PageCountLevel int = 1000,

    @SortInTempdb nvarchar(max) = 'N',

    @MaxDOP int = NULL,

    @FillFactor int = NULL,

    @LOBCompaction nvarchar(max) = 'N',

    @StatisticsSample int = NULL,

    @PartitionLevel nvarchar(max) = 'N',

    @TimeLimit int = NULL,

    @Execute nvarchar(max) = 'Y'