June 6, 2005 at 7:07 am
can anybody help me out to move one of my big big existing table to different file group.
thanks
June 6, 2005 at 7:09 am
Recreate the clustered index on that new filegroup. To speed this up you can use WITH DROP EXISTING. See BOL "CREATE INDEX" for complete syntax.
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
June 6, 2005 at 7:25 am
thanks Frank ,but there is any way to move my existing table to other file group?
June 6, 2005 at 7:29 am
Yes, Enterprise Manager uses another way. It will create an interims table, move data there, create target table and move the data from interims table to target table. Not terribly efficient, if you ask me.
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
June 6, 2005 at 7:37 am
hmm ,thanks it means without a kind of interm/temp table i cannot simply move my table to different filegroup.
am i correct
June 6, 2005 at 7:41 am
When you recreate the clustered index on that new filegroup, you don't need an interims table.
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
June 6, 2005 at 7:58 am
Great Frank ,Frank one more question for you , through query analyzer i can specify the filegroup while creating new table .
is there any way in enterprise manager also where we can specify the file group other than the default one while creating new table?
June 6, 2005 at 8:07 am
Yes, there is. But when you use Enterprise Manager, it will use the interim table method.
One method might be to have Enterprise Manager create the change script and save it to a file. You could edit that file and remove all unnecessary stuff and only leave the CREATE INDEX statement in there.
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
June 6, 2005 at 8:08 am
...too quick. I would still schedule this for off-peak usage hours. Depending on how large your table actually is.
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply