SA0223 : The MODIFY FILEGROUP READONLY and READWRITE syntax is deprecated |
![]() |
The topic describes the SA0223 analysis rule.

The MODIFY FILEGROUP READONLY and READWRITE syntax is deprecated

The rule check T-SQL code for the deprecated feature syntax ALTER DATABASE MODIFY FILEGROUP READONLY or READWRITE.
The keyword READONLY and READWRITE keywords will be removed in a future version of Microsoft SQL Server.

Do not use READONLY and READWRITE keywords in new development work. Modify existing code and use MODIFY FILEGROUP READ_ONLY or READ_WRITE syntax instead.

The rule has a Batch scope and is applied only on the SQL script.

Rule has no parameters.

The rule does not need Analysis Context or SQL Connection.


Deprecated Features, Bugs


SQL
1ALTER DATABASE TestDb1 MODIFY FILEGROUP Fg1 READONLY; 2 3ALTER DATABASE TestDb1 MODIFY FILEGROUP Fg2 READWRITE |

Message | Line | Column | |
---|---|---|---|
1 | SA0223 : The MODIFY FILEGROUP READONLY and READWRITE syntax is deprecated. | 1 | 45 |
2 | SA0223 : The MODIFY FILEGROUP READONLY and READWRITE syntax is deprecated. | 3 | 45 |
