Click or drag to resize

SA0217 : Usage of GRANT,DENY and REVOKE statement with ALL option is deprecated

The topic describes the SA0217 analysis rule.

Message

Usage of GRANT,DENY and REVOKE statement with ALL option is deprecated

Description

The rule checks T-SQL code and reports usages of the deprecated GRANT ALL,DENY ALL and REVOKE ALL statements.

Use specific permissions with GRANT, DENY and REVOKE statements.

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

Deprecated Features

Additional Information
Example Test Script
SQL
 1REVOKE VIEW DEFINITION ON ROLE::SammamishParking   
 2    FROM JinghaoLiu CASCADE;  
 3
 4REVOKE ALL ON ROLE::SammamishParking   
 5    FROM JinghaoLiu CASCADE;  
 6
 7GRANT ALL TO AuditMonitor
 8
 9
10DENY ALL ON ROLE::SammamishParking   
11    TO JinghaoLiu CASCADE;

Analysis Results

 MessageLineColumn
1SA0217 : Usage of GRANT,DENY and REVOKE statement with ALL option is deprecated.47
2SA0217 : Usage of GRANT,DENY and REVOKE statement with ALL option is deprecated.76
3SA0217 : Usage of GRANT,DENY and REVOKE statement with ALL option is deprecated.105
See Also

Other Resources