Index rebuild on large database – SQL Agent Powershell job

Index rebuild on a large database could take longer time. One of our customer was looking for a solution to rebuild index one by one  when index  fragmentation is greater than 30%. 

Related  newsgroup thread:

I have written a SQL Powershell script that identifies indexes on tables that have fragmentation greater than 30% and performs a Index Rebuild one by one. You can also control the number of indexes to process in single script run. You can run this SQL powershell script as a recurring scheduled SQL Agent job .  More details at: 

Comments (0)

Skip to main content