You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/t-sql/database-console-commands/dbcc-show-statistics-transact-sql.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -153,14 +153,16 @@ The query optimizer uses densities to enhance cardinality estimates for queries
153
153
DBCC SHOW_STATISTICS does not provide statistics for spatial or xVelocity memory optimized columnstore indexes.
154
154
155
155
## Permissions for [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] and [!INCLUDE[ssSDS](../../includes/sssds-md.md)]
156
-
In order to view the statistics object, the user must own the table or the user must be a member of the `sysadmin` fixed server role, the `db_owner` fixed database role, or the `db_ddladmin` fixed database role.
157
-
158
-
[!INCLUDE[ssSQL11](../../includes/sssql11-md.md)] SP1 modifies the permission restrictions and allows users with SELECT permission to use this command. Note that the following requirements exist for SELECT permissions to be sufficient to run the command:
156
+
In order to view the statistics object, the user must have the SELECT permission on the table.
157
+
Note that the following requirements exist for SELECT permissions to be sufficient to run the command:
159
158
- Users must have permissions on all columns in the statistics object
160
159
- Users must have permission on all columns in a filter condition (if one exists)
161
-
- The table cannot have a row-level security policy.
162
-
163
-
To disable this behavior, use traceflag 9485.
160
+
- The table cannot have a row-level security policy.
161
+
- If any of the columns within a statistics object is masked with Dynamic Data Masking rules, in addition to the SELECT permission, the user must have the UNMASK permission
162
+
163
+
In versions before [!INCLUDE[ssSQL11](../../includes/sssql11-md.md)] SP1, the user must own the table or the user must be a member of the `sysadmin` fixed server role, the `db_owner` fixed database role, or the `db_ddladmin` fixed database role.
164
+
[!NOTE]
165
+
To change the behavior back to the pre [!INCLUDE[ssSQL11](../../includes/sssql11-md.md)] SP1 behavior, use traceflag 9485.
164
166
165
167
## Permissions for [!INCLUDE[ssSDW](../../includes/sssdw-md.md)] and [!INCLUDE[ssPDW](../../includes/sspdw-md.md)]
166
168
DBCC SHOW_STATISTICS requires SELECT permission on the table or membership in one of the following:
0 commit comments