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 2008 Forums
 SQL Server Administration (2008)
 is it possible that a user table is in 2 filegroup

Author  Topic 

alejo46
Posting Yak Master

157 Posts

Posted - 2010-12-03 : 11:17:03
Good morning

i have a table namaed tablex, i know that a table has only one filegroup but no in 2 FG. DOESNT IT?


in SSMS tells me that tablex is in FG x and using sp_help tablex tells me the that object is storaged in that FG.

i apprecita yor help

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2010-12-03 : 11:33:53
Don't understand.
Sounds like you have a table in filegroup x and sp_help and SSMS agree.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-12-03 : 13:04:11
Is your table partitioned?

A partitioned table can live on multiple filegroups. A table that is not partitioned can only reside in a single filegroup.
Go to Top of Page

jeffw8713
Aged Yak Warrior

819 Posts

Posted - 2010-12-03 : 16:00:24
If we are only talking about the clustered index - then yes, if it is not partitioned it will be in one filegroup. Non-clustered indexes can be in other filegroups.
Go to Top of Page

alejo46
Posting Yak Master

157 Posts

Posted - 2010-12-04 : 18:08:51
Thanks a lot, but how do i know a table is partioned? is any other sql command ?. you said Non-clustered indexes can be in other filegroups, so ie when i use the command sp_help tablex it shows the properties of the table, right? if the table has thos kind of indexes (Non-clustered indexes) menas the table is partitioned?

i appreciate your help

Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-12-04 : 20:24:27
No, a non-clustered index has nothing to do with partitioning. A non-clustered index can be created on a filegroup other than the one the table is on. In fact, this is a common strategy.

A table itself MUST reside completely within one signle filegroup, unless it is partitioned.

See the links below for information on partitioning

http://technet.microsoft.com/en-us/library/dd578580(SQL.100).aspx

http://blogs.msdn.com/b/craigfr/archive/2008/07/15/partitioned-tables-in-sql-server-2008.aspx

http://msdn.microsoft.com/en-us/library/ms188730.aspx

And these for filegroup management:

http://www.sql-server-performance.com/tips/filegroups_p1.aspx

http://msdn.microsoft.com/en-us/library/ms179316.aspx

Go to Top of Page
   

- Advertisement -