Auto Rebuild Indexes
This pair of stored procs together will allow you to defrag/reindex all the tables in a database that you deem necessary, based on a fragmentation percentage you pass in as a parameter. It also keeps a "Before" and "After" history of your tables' fragmentation with every run, enabling easy reporting on this regular maintenance. Run this as a scheduled job to automate a good portion of your job of keeping your tables streamlined and healthy.
SCRIPT:
Auto Rebuild Indexes
PK aE<