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
 Transact-SQL (2005)
 filegroup

Author  Topic 

yadhu_cse
Constraint Violating Yak Guru

252 Posts

Posted - 2010-11-16 : 03:22:57
Hi,
can u tel how to find tables in specific filegroup.
i have not created any idex over any table.
how to select data from table in a particu;ar file group

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2010-11-16 : 05:36:30
I found this:

SELECT
o.[name] as TableName,
o.[type],
i.[name] as IndexName,
i.[index_id],
f.[name] as FilegroupName
FROM sys.indexes i
INNER JOIN sys.filegroups f
ON i.data_space_id = f.data_space_id
INNER JOIN sys.all_objects o
ON i.[object_id] = o.[object_id]
WHERE i.data_space_id = f.data_space_id
AND o.type = 'U' -- User Created Tables


here: http://blog.sqlauthority.com/2009/06/01/sql-server-list-all-objects-created-on-all-filegroups-in-database/


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
   

- Advertisement -