Script Download:

This T-SQL sample script illustrates how to check index fragmentation of a specified database in SQL Server.

This script can be used for checking index fragmentation percentage of tables in SQL Server user databases. You can specify the database name and fragmentation percent, after you run the script, you will get the result.


image image

You can find more All-In-One Script Framework script samples at