Useful partition script

Retrieve filegroup by table name and partition range The following script can be used to retrieve the filegroup name for a given table and a partition range.  It can be very useful in an automated sliding window process. declare @tablename nvarchar(128) declare @range sql_variant   set @tablename = ‚myPartitionedTable‘ set @range = 1209   declare…

2