Home All Groups Group Topic Archive Search About

Move existing table to another file or filegroup

Author
13 May 2005 9:12 AM
ales vojacek
Hi,
is it possible to move existing table to another file or filegroup?
Thanks Ales

Author
13 May 2005 9:17 AM
Tibor Karaszi
Re-create the clustered index on that filegroup. If you don't have a clustered index and don't want
to have one, create one on the file group and then drop it.

Show quote
"ales vojacek" <ales voja***@discussions.microsoft.com> wrote in message
news:F6788339-43BB-480E-A164-16E313CD32C6@microsoft.com...
> Hi,
> is it possible to move existing table to another file or filegroup?
> Thanks Ales
Author
13 May 2005 9:28 AM
ales vojacek
It moves data from whole table to new file group?

Ales
Show quote
"Tibor Karaszi" wrote:

> Re-create the clustered index on that filegroup. If you don't have a clustered index and don't want
> to have one, create one on the file group and then drop it.
>
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
>
> "ales vojacek" <ales voja***@discussions.microsoft.com> wrote in message
> news:F6788339-43BB-480E-A164-16E313CD32C6@microsoft.com...
> > Hi,
> > is it possible to move existing table to another file or filegroup?
> > Thanks Ales
>
>
>
Author
13 May 2005 9:54 AM
Tibor Karaszi
Yes. A clustered index is the same as the table (or, more formally: the leaf pages of the clustered
index are the data pages).

Show quote
"ales vojacek" <alesvoja***@discussions.microsoft.com> wrote in message
news:295FDF4A-623F-42A6-AA3F-0C0623894240@microsoft.com...
>
> It moves data from whole table to new file group?
>
> Ales
> "Tibor Karaszi" wrote:
>
>> Re-create the clustered index on that filegroup. If you don't have a clustered index and don't
>> want
>> to have one, create one on the file group and then drop it.
>>
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>>
>> "ales vojacek" <ales voja***@discussions.microsoft.com> wrote in message
>> news:F6788339-43BB-480E-A164-16E313CD32C6@microsoft.com...
>> > Hi,
>> > is it possible to move existing table to another file or filegroup?
>> > Thanks Ales
>>
>>
>>
Author
20 Jun 2005 1:56 PM
Omri Bahat
I wrote a script that moves a table to another filegroup, and you can
download it from
http://education.sqlfarms.com/ShowPost.aspx?PostID=59

Note that you can specify whether only data pages, and/or other indexes and
constraints should be moved automatically by the script. It's fairly long,
however it was very well-tested.

---------------------------------
Omri Bahat
SQL Farms Solutions
www.sqlfarms.com

AddThis Social Bookmark Button