Question – Whats on my secondary filegroup? | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Question – Whats on my secondary filegroup?

Hello everyone- Quick question. I’m at this new site and the DBA left ‘in a hurry’ if you will. There’s a secondary filegroup on this database, and there’s no documentation regarding what’s exactly on here. Is there a quick/easy way to determine what tables/indexes are on a particular file in a filegroup? Thanks! Donger
SELECT CAST(OBJECT_NAME(sysind.id) AS CHAR(20)) AS TableName , CAST(sysind.name AS CHAR(30)) AS IdxName , CAST(sysfg.groupname AS CHAR(10)) AS GroupName FROM sysindexes sysind INNER JOIN sysfilegroups sysfg ON sysind.groupid = sysfg.groupid INNER JOIN sysobjects sysobj ON sysind.id = sysobj.id WHERE sysobj.xtype <> ‘S’ AND sysind.name NOT LIKE ‘_WA%’ ORDER BY sysind.TableName
Awesome query, thanks! Donger
very usefull query , thanks gkrishn[<img src=’/community/emoticons/emotion-1.gif’ alt=’:)‘ />]<br /><br />AKTHAR
]]>