>>Are you running the latest version (the one with the baby picture)? I believe it worked fine for me.
>
>Ok, I found it. I ran it and I see it creates two tables.
>
>dba_indexDefragLog Table Created
>dba_indexDefragExclusion Table Created
>
>Those tables are empty. Is there something else that need to be run?
Did you run the actual procedure dbo.dba_indexDefrag_sp? Read up the parameters at the top to see how you should call it.
Example of how to call this script:
Exec dbo.dba_indexDefrag_sp
@executeSQL = 1
, @printCommands = 1
, @debugMode = 1
, @printFragmentation = 1
, @forceRescan = 1
, @maxDopRestriction = 1
, @minPageCount = 8
, @maxPageCount = Null
, @minFragmentation = 1
, @rebuildThreshold = 30
, @defragDelay = '00:00:05'
, @defragOrderColumn = 'page_count'
, @defragSortOrder = 'DESC'
, @excludeMaxPartition = 1
, @timeLimit = Null;
If it's not broken, fix it until it is.
My Blog