Index

  • I have 10 Database in 1 server and I want to rebuild/reorganize index.

    I want to capture all the average fragmentation before and after rebuilding Index for entire DB. Does anyone has script for that.

    Steps need to be performed.

    -Insert all the data prior to rebuild for all 10 DB

    -Rebuild/reorganize for all 10 DB on same server

    -Insert all the data after it got rebuilt the indexes.

    Nita

  • Here are two options, but there are more available.

    https://ola.hallengren.com/

    http://www.midnightsql.com/minion/minion-reindex/

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • You'll find some scripts that you can alter as needed here as well.

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

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

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