How to move table from Primary to Secondary File group.

Discussion How to move table from Primary to Secondary File group.

  • Saturday, May 05, 2012 9:31 PM
     
     

    I am having small doubts regarding table moving between file group\files. in case we dont have downtime.

    how can we move table without index (cluster and unique) from primary to secondary filegroup ?

    how can we move table withindex (cluster and unique) from primary to secondary filegroup ?

    how can we move table with image & text datatype from primary to secondary filegroup ?

    how can we drop the particular file\file group in case it is not use ? We dont have downtime.

    how can we move the file from one file group to another without downtime ?


    india

All Replies

  • Sunday, May 06, 2012 7:42 AM
     
     

    >>>how can we move table without index (cluster and unique) from primary to secondary filegroup ?

    A) CREATE Clustered Index with specify desired file group

    >>how can we move table withindex (cluster and unique) from primary to secondary filegroup ?

    B) CREATE Clustered Index ... WITH DROP_EXISTING clause (for details refer to the BOL)

    >>>how can we move table with image & text datatype from primary to secondary filegroup ?

    C) See A)

    >>how can we drop the particular file\file group in case it is not use ? We dont have downtime.

    ALTER DATABASE <DB> REMOVE FILEGROUP (http://forums.microsoft.com/Forums/ShowPost.aspx?PostID=1906957&SiteID=1)


    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/