Partitioning is totally supported in Azure SQL Database, including the Hyperscale service tier.
However, adding additional filegroups is not supported in Azure SQL Database.
If you look at the docs for Files & Filegroups, the "Applies to" section says "SQL Server (all supported versions)" which actually refers to ONLY the traditional self-installed "running on a Server" flavor of SQL Server, and not Azure SQL Database. Adding additional filegroups to Azure SQL Database doesn't work.
There are a number of features/syntaxes that don't work in Azure SQL Database, which all throw Error 40517:
Keyword or statement option '%.*ls' is not supported in this version of SQL Server.
In the case of adding a filegroup, %.*ls
gets replaced with filegroup
when the error is thrown:
Msg 40517, Level 16, State 1, Line 4
Keyword or statement option 'filegroup' is not supported in this version of SQL Server.
For various data management reasons (spreading out IO, slower storage or archive data, piecemeal restores, etc), you may want to have separate filegroups for separate partitions. However, this isn't a requirement to use partitioning, and you can just as easily set up partitioning with everything in the PRIMARY
filegroup--this ends up being your only option in Azure SQL Database.
You can just skip the step of creating new filegroups and proceed with configuring partitioning by creating partition schemes & functions, then applying those to a table.
ALTER DATABASE testDB1 ADD FILEGROUP testfg1;