Home Forums SQL Server 2005 Administering Move a clustered index from one filegroup to another on a production database RE: Move a clustered index from one filegroup to another on a production database

  • DesmoShane (11/6/2012)


    I would like to move a clustered index from one filegroup to another on a production database without causing any disruption for users and was wondering if this is the recommended process for doing this

    sql version is 2008 R2 Enterprise

    The table has non clustered indexes in a different filegroup so the clustered index is the only data in this filegroup. The options i think should work are are in the attached script

    USE [Database_Name]

    GO

    CREATE CLUSTERED INDEX [Clustered_Index_Name] ON [dbo].[Table_Name]

    (

    [Column_1_Name] ASC,

    [Column_2_Name] ASC,

    [Column_3_Name] ASC,

    [Column_4_Name] ASC

    )WITH (STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = ON, ONLINE = ON, ALLOW_ROW_LOCKS = OFF, ALLOW_PAGE_LOCKS = OFF) ON [PRIMARY]

    GO

    Can someone advise if doing this (apart from cpu\memory usage) will cause any unexpected issues with the user experience on the database that this is being run on and if i am aproaching this in a recommended or best practice fashion

    will the resulting non-clustered indexes will they be rebuilt automaticaly and be an online operation

    why you need to move clustered indexes to new filegroup ?

    Moving clustered indexes to another filegroup is nothing but you are moving entire table to the new filegroup.

    -----------------------------------------------------------------------------
    संकेत कोकणे