|
sql
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Move existing table to another file or filegroupHi,
is it possible to move existing table to another file or filegroup? Thanks Ales 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 quoteTibor 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 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 > > > 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 quoteTibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www.solidqualitylearning.com/ "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 >> >> >> 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 |
|||||||||||||||||||||||