This procedure allows you to check and fix fragmentation in your databases. Alternatively, it can also provide you with recommendations without fixing fragmentation issues. Please review the help from the Procedure to learn more about various parameters/options it supports.
This Script Provides the following information:
1. Database name in which fragmentation was found, Table Name, Index Name that is fragmented, Percentage of Fragmentation,
2. Recommendation on what to do about fragmentation and script that you can use to individually and manually defrag or rebuild the index.
3. This script is generated based on the recommendations provided by SQLCOMMUNITY. Note: This script does not generate any scripts for heaps.