sp_dbcc_exclusions

Allows the user to create and manage persistent exclusion lists for use by checkverify and sp_dbcc_faultreport.

Syntax

sp_dbcc_exclusions dbname, op, type, exclusion_list

Parameters

Examples

Usage

There are additional considerations when using sp_dbcc_exclusions:
  • dbname must be null when listall is specified. If op is null, sp_dbcc_exclusions lists the recorded exclusions for the specified database.

  • Only a system administrator or the Database Owner can run sp_dbcc_exclusions with a dbname parameter that is not null.

  • If the dbname and op parameters are null, the user must either be a system administrator or own at least one of the databases for which exclusions have been recorded.

  • If the dbname parameter is null and the op parameter is listall, the user must either be a system administrator or own at least one of the databases for which exclusions have been recorded. If the user is not a system administrator, only the recorded exclusions for databases owned by the user are reported.

Permissions

The permission checks for sp_dbcc_exclusions differ based on your granular permissions settings.

SettingDescription
Enabled

With granular permissions enabled, you must be the database owner of dbccdb (or dbccalt), or have the manage checkstorage privilege on the specified database.

Disabled

With granular permissions disabled, you must be a user with sa_role.