Home Forums SQL Server 2005 Administering indexing online vs offline, and setting a database offline RE: indexing online vs offline, and setting a database offline

  • klineandking (1/19/2010)


    Good morning people

    Very good morning 😉

    my questions is about reorganizing or rebuilding indexes online vs offline, i do not know what this actually means or how its done

    1.Index rebuild works by re-creating the index internally again and when that has been achieved, it drops the existing index where as index reorganize is the process of physically re-organizing the leaf nodes of the index.

    2.During the index rebuild process, the statistics are also re-computed – same as when a new index gets created. Reorganize on the other hand does not update the statistics. Reorganize essentially just swaps one page with another and thus does not require free space for this operation like rebuild does. Infact, reorganize can free up some pages as it does the reorg in two phases – compaction and defrag.

    3. Online Rebuilds of Indexes are supported in Enterprise Edition only..

    and my next question is what would be the reasons for taking a database offline

    Depends on what you are trying to do?

    HTH...

    The_SQL_DBA
    MCTS

    "Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives."