DF052: The READONLY, READWRITE, or TORN_PAGE_DETECTION option is used.
Last modified: May 28, 2025
The topic describes the DF052 T-SQL code analysis rule.
Category
DEPRECATED
Message
The READONLY, READWRITE, or TORN_PAGE_DETECTION option is used.
Description
READONLY, READWRITE, and TORN_PAGE_DETECTION options are deprecated and are no longer supported.
Additional information
- The MODIFY FILEGROUP READONLY syntax was deprecated. Use the READ_ONLY syntax instead.
- The MODIFY FILEGROUP READWRITE syntax was deprecated. Use the READ_WRITE syntax instead.
- The syntax structure of TORN_PAGE_DETECTION ON | OFF will be removed in future versions of SQL Server. Use the PAGE_VERIFY option instead.
Noncompliant code example
ALTER DATABASE demodb MODIFY FILEGROUP [filegroup1] READONLY;
GO
ALTER DATABASE demodb MODIFY FILEGROUP [filegroup1] READWRITE;
GO
ALTER DATABASE demodb SET TORN_PAGE_DETECTION ON;
GO
Compliant solution
ALTER DATABASE demodb MODIFY FILEGROUP [filegroup1] READ_ONLY;
GO
ALTER DATABASE demodb MODIFY FILEGROUP [filegroup1] READ_WRITE;
GO
ALTER DATABASE demodb SET PAGE_VERIFY CHECKSUM;
GO
Was this page helpful?
Want to find out more?
Overview
Take a quick tour to learn all about the key benefits delivered by dbForge Studio for SQL Server.
All features
Get acquainted with the rich features and capabilities of the tool in less than 5 minutes.
Request a demo
If you consider employing this tool for your business, request a demo to see it in action.