Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
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.
We've recently moved some write-intensive tables to a second SQL server, which I believe frees up a RAID 1 filegroup for new things. However, I'd like to be sure. Is there any way to find what objects live on a particular filegroup?Thanks-b
aiken
Aged Yak Warrior
525 Posts
Posted - 2004-09-20 : 18:15:32
Ok, found it myself (Google works better if you ask the right question). For future reference:
SELECT OBJECT_NAME(id) AS [Table Name], FILEGROUP_NAME(groupid) AS[Filegroup Name]FROM sysindexesWHERE indid IN (0, 1)AND OBJECTPROPERTY(id, 'IsMSShipped') = 0AND groupid = FILEGROUP_ID('UserData')