CREATE PARTITION SCHEME
defines partitioning metadata
What changes
- Input
- catalog
- Output or change
- partition function (boundary values) or scheme (filegroup map)
Syntax at a glance
CREATE PARTITION SCHEME partition_scheme_name AS PARTITION partition_function_name [ ALL ] TO ( { file_group_name | [ PRIMARY ] } [ , ...n ] ) [ ; ]
Work example
A partition function needs a mapping from ranges to filegroups.
Match every destination filegroup to the storage and retention plan before using the scheme.
Check your work The function and scheme have the same boundary count and each range maps to its intended filegroup.
Open Microsoft Learn for full syntax, permissions, and details for your version.