- Blog - http://blog.bennett-scharf.com -
Index to Filegroup mapping
Posted By Bennett On 28. January 2010 @ 14:00 In T-SQL, SQL Server | No Comments
Here is a trivial script to show where a particular index resides. It saves clicking around the SSMS GUI.
SELECT i.name, i.type_desc, i. is_primary_key, i.is_unique, s.name AS [Filegroup]
FROM sys.indexes i
INNER JOIN sys.data_spaces s
ON i.data_space_id = s.data_space_id
WHERE i.name IS NOT NULL
AND i.name NOT IN (‘clust’, ‘clst’, ‘nc1′, ‘nc2′, ‘nc3′, ‘nc’, ‘cl’)
ORDER BY s.data_space_id, i.name
Article printed from Blog: http://blog.bennett-scharf.com
URL to article: http://blog.bennett-scharf.com/2010/01/28/index-to-filegroup-mapping/
Click here to print.