Rebuild Index Script on SQLSERVER 2000

  • Hi,

    I had found lot of script for Index Rebuild script in Google, But all are executed automatically when matching below option.

    1. Check the fragmentation greater than 30% and pages greater than 1000 then rebuild

    2. Check the fragmentation between 15% to 29% and pages greater than 1000 then reorganize.

    3. Update the statistics the first two conditions is false

    I want script like only print command not automatically run.

    I need command & report for example below when run index fragmentation script.

    1. DB name

    2.Table Name

    3.Index Name

    4. Fragmentation %

    5. Page Count

    6. script -DBCC DBREINDEX ('pubs.dbo.authors', UPKCL_auidind, 80)- after 30% and page count 1000

    and DBCC INDEXFRAG ('pubs.dbo.authors', UPKCL_auidind, 80) - below 30% and page count below 1000

    7.Run date.

    Please provide this type script. very helpful for me.

    Rgds

    ananda

  • there is a person on this earth for me whom I follow for this type of maintenace task and his name is Ola. He is kind enough to keep updating via mail whenever their is any upgrade version available in his solution.

    And till date it worked for everyone whoever used it.

    Feel free to use it and proof urself to be one of those lucky person. Also dont forget to send thank you note to Ola.

    Link for his maintenance solution can be found here

    http://ola.hallengren.com/Versions.html

    ----------
    Ashish

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply