• You've fallen into the classic trap of not filtering by allocation unit type - any LOB_DATA or ROW_OVERFLOW_DATA allocation units with fragmentation will trigger index rebuilds/reorganizes even if the IN_ROW_DATA allocation unit has no fragmentation. You need to update the script to handle that.

    Paul Randal
    CEO, SQLskills.com: Check out SQLskills online training!
    Blog:www.SQLskills.com/blogs/paul Twitter: @PaulRandal
    SQL MVP, Microsoft RD, Contributing Editor of TechNet Magazine
    Author of DBCC CHECKDB/repair (and other Storage Engine) code of SQL Server 2005