Thor Logo dbatools

Partition

Get-DbaDbPartitionFunction

Klaas Vandenberghe (@PowerDbaKlaas)

Get-DbaDbPartitionFunction View Source Klaas Vandenberghe (@PowerDbaKlaas) Windows, Linux, macOS Synopsis Retrieves partition function definitions and metadata from SQL Server databases. Description Retrieves partition function definitions and their metadata from one or more SQL Server databases. Partition functions define how table or index data is distributed across multiple partitions based on the values of a partitioning column. This function returns details like creation date, function name, and number of partitions, making it useful for documenting partitioning schemes, analyzing partition distribution strategies, and auditing partitioned table configurations before maintenance operations.

Read more

Get-DbaDbPartitionScheme

Klaas Vandenberghe (@PowerDbaKlaas)

Get-DbaDbPartitionScheme View Source Klaas Vandenberghe (@PowerDbaKlaas) Windows, Linux, macOS Synopsis Retrieves partition schemes from SQL Server databases for table partitioning management. Description Retrieves partition scheme objects from one or more SQL Server databases, providing details about how partitioned tables and indexes are distributed across filegroups. Partition schemes define the physical storage mapping for partitioned tables by specifying which filegroups contain each partition’s data. This function helps DBAs inventory existing partition schemes when planning table partitioning strategies, troubleshooting performance issues with partitioned tables, or preparing for partition maintenance operations.

Read more

Remove-DbaDbPartitionScheme

Mikey Bronowski (@MikeyBronowski), bronowski.it

Remove-DbaDbPartitionScheme View Source Mikey Bronowski (@MikeyBronowski), bronowski.it Windows, Linux, macOS Synopsis Removes database partition schemes from SQL Server databases. Description Removes partition schemes from specified databases across one or more SQL Server instances. Partition schemes define how partitioned tables and indexes map to filegroups, and this function helps clean up unused schemes during database reorganization or migration projects. The function integrates seamlessly with Get-DbaDbPartitionScheme through pipeline support, allowing you to first identify partition schemes and then selectively remove them.

Read more