Click or drag to resize

SA0223 : The MODIFY FILEGROUP READONLY and READWRITE syntax is deprecated

The topic describes the SA0223 analysis rule.

Message

The MODIFY FILEGROUP READONLY and READWRITE syntax is deprecated

Description

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.

Avoid using them in new development work, and plan to modify applications and use MODIFY FILEGROUP READ_ONLY or READ_WRITE syntax instead.

Scope

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

Parameters

Rule has no parameters.

Remarks

The rule does not need Analysis Context or SQL Connection.

Categories

New Rules, Deprecated Features

Additional Information
Example Test Script
SQL
1ALTER DATABASE TestDb1  MODIFY FILEGROUP Fg1 READONLY;
2
3ALTER DATABASE TestDb1  MODIFY FILEGROUP Fg2 READWRITE

Analysis Results

 MessageLineColumn
1SA0223 : The MODIFY FILEGROUP READONLY and READWRITE syntax is deprecated.145
2SA0223 : The MODIFY FILEGROUP READONLY and READWRITE syntax is deprecated.345
See Also

Other Resources