locked
SQL SERVER REINDEXING SCRIPT WITH FRAGMENTATION LEVEL RRS feed

  • Question

  • Hello,

    I am looking for script that does reindexing based on the fragmentation level, i have a couple that i created but i want to get some more details about it, thank you.

    Tuesday, October 16, 2018 7:49 PM

All replies

  • here is the best script for index maintenance

    https://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html


    Ramesh Babu Vavilla MCTS,MSBI

    • Proposed as answer by Olaf HelperMVP Wednesday, October 17, 2018 6:04 AM
    Tuesday, October 16, 2018 9:39 PM
  • Hello,

    I am looking for script that does reindexing based on the fragmentation level, i have a couple that i created but i want to get some more details about it, thank you.

    Ola's index maintenance script does a great job of index reorg/rebuild. You can choose from several options and define your lower and upper fragmentation thresholds. You can download it from the link Ramesh posted. It also has examples on how to call it in a SQL job etc.  

    Please remember to click "Mark as Answer" if my response answered your question or click "Vote as helpful" if it helped you in any way.

    Tuesday, October 16, 2018 10:21 PM