December 16, 2009 at 7:45 am
Is there a query that I can run to determine what filegroup a partition number resides on? I used the $Partition Function to find the partition number. I've queried all of the catalog and system views, but I have yet to find a query that joins them all together to find out what filegroup a partition number resides on.
December 16, 2009 at 8:00 am
cathy.baker (12/16/2009)
Is there a query that I can run to determine what filegroup a partition number resides on? I used the $Partition Function to find the partition number. I've queried all of the catalog and system views, but I have yet to find a query that joins them all together to find out what filegroup a partition number resides on.
i.e.
select ds.name AS [Filegroup Name], ds.type, destination_id AS [partition number], dds.partition_scheme_id, ps.name as [partition scheme]
from sys.data_spaces ds
join sys.destination_data_spaces dds
on (ds.data_space_id = dds.data_space_id)
join sys.partition_schemes ps
on (ps.data_space_id = dds.partition_scheme_id)
order by ds.name, ps.name ASC
Tommy
Follow @sqlscribeDecember 16, 2009 at 8:42 am
Fabulous. Thanks!
December 16, 2009 at 9:39 am
NP 😀
Tommy
Follow @sqlscribeViewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply