Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Adding a table to a Filegroup

Author  Topic 

sagitariusmzi
Posting Yak Master

113 Posts

Posted - 2009-07-22 : 02:01:21
Hi,

I have a Database XYX, which has xyz.mdf and xyz_log.ldf files
Now i create a filegroup in this database called xyz_FG1.ndf

I have a table tblInfo and i want to remove this table in xyz_FG1.ndf filegroup.

How can i do that ?

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2009-07-22 : 02:10:17
create clustered index in the new filegroup


CREATE Clustered Index CI_tblInfo (pkField)
On xyz_FG1; -- assuming this is the logical name of filegroup
Go to Top of Page

sagitariusmzi
Posting Yak Master

113 Posts

Posted - 2009-07-22 : 02:12:06

I think it should move the clustered index not the table.
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2009-07-22 : 02:15:21
that's how. unless you drop and recreate the table.

what is at the leaf level of a clustered index? the table data.
Go to Top of Page

sagitariusmzi
Posting Yak Master

113 Posts

Posted - 2009-07-22 : 07:10:09
you mean to say that i need to drop and then recreate the table in a specific filegroup ?

Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2009-07-22 : 09:04:41
No. I mean to say you need to drop and create the clustered index on the specific filegroup.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2009-07-24 : 22:07:32
Moving clustered index will move table as well.
Go to Top of Page
   

- Advertisement -