You are here: Re: moving tables « MsSQL Server « IT news, forums, messages
Re: moving tables

Posted by Erland Sommarskog on 02/01/06 00:42

helen_msql (elena.kolovarsky@gmail.com) writes:
> ms-sqlserver 2000 sp4 - entrerprise edition
>
> Can you help me on this issue. I would like to move some user
> tables(about 100 MB) to new file group. Can you tell me what I need to
> do?

If the table has a clustered index rerun the CREATE INDEX statement
with WITH DROP_EXISTING ON NewFileGroup.

If the table does not have a clustered index, create one that uses
the ON clause, and then drop the index.

As the data is the at leaf level of the clustered index, this will move
the data as well as the index. If there are non-clustered indexes on the
table, then you can move these in the same way as well.

Disclaimer: I have never actually done myself, as I've never worked
with multiple filegroups.

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация