SA0216 : The TORN_PAGE_DETECTION option of ALTER DATABASE is deprecated. Use the PAGE_VERIFY option instead

The topic describes the SA0216 analysis rule.

Message

The TORN_PAGE_DETECTION option of ALTER DATABASE is deprecated. Use the PAGE_VERIFY option instead

Description

The rule checks T-SQL code and reports usages of the deprecated TORN_PAGE_DETECTION option inside ALTER DATABASE statements.

The syntax structure TORN_PAGE_DETECTION ON | OFF will be removed in a future version of SQL Server.

How to fix

Avoid using this syntax structure in new development work, and plan to modify applications that currently use the syntax structure to use the PAGE_VERIFY option instead.
For example:

1ALTER DATABASE AdventureWorks2012 SET TORN_PAGE_DETECTION ON


Can be rewritten this way:

1ALTER DATABASE AdventureWorks2012 SET PAGE_VERIFY TORN_PAGE_DETECTION

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.

Effort To Fix
20 minutes per issue.
Categories

Deprecated Features, Bugs

Additional Information
Example Test SQL
SQL
1ALTER DATABASE AdventureWorks2012 
2SET SINGLE_USER, TORN_PAGE_DETECTION ON,PAGE_VERIFY TORN_PAGE_DETECTION

Example Test SQL with Automatic Fix
SQL
1ALTER DATABASE AdventureWorks2012 
2SET SINGLE_USER, PAGE_VERIFY TORN_PAGE_DETECTION,PAGE_VERIFY TORN_PAGE_DETECTION

Analysis Results
  Message Line Column
1 SA0216 : The TORN_PAGE_DETECTION option of ALTER DATABASE is deprecated. Use the PAGE_VERIFY option instead. 2 17
See Also

Other Resources