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 2000 Forums
 SQL Server Administration (2000)
 Finding what objects use a filegroup?

Author  Topic 

aiken
Aged Yak Warrior

525 Posts

Posted - 2004-09-20 : 17:47:19
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 sysindexes
WHERE indid IN (0, 1)
AND OBJECTPROPERTY(id, 'IsMSShipped') = 0
AND groupid = FILEGROUP_ID('UserData')


Cheers
-b
Go to Top of Page
   

- Advertisement -