Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

filegroups and tables. Expand / Collapse
Posted Monday, August 27, 2012 2:13 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: 2 days ago @ 9:46 AM
Points: 307, Visits: 1,459
How can I see which tables belong to a filegroup ?

(A selection which gives me all tables belonging to a single filegroup).

Thanks for your time and attention,
Ben brugman
Post #1350245
Posted Monday, August 27, 2012 2:22 AM



Group: General Forum Members
Last Login: Today @ 4:36 PM
Points: 43,050, Visits: 40,040
SELECT  OBJECT_NAME(object_id) AS TableName , AS IndexName , AS FileGroupName
FROM sys.data_spaces AS ds
INNER JOIN sys.indexes AS i ON ds.data_space_id = i.data_space_id

Gail Shaw
Microsoft Certified Master: SQL Server, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1350250
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse