sp_dbcc_evaluatedb  sp_dbcc_faultreport

Chapter 4: dbcc Stored Procedures

sp_dbcc_exclusions

Description

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

dbname

is the name of the database for which the exclusions apply, or null if it applies to all databases.

op

Type is varchar. Accepted values are:

type

is the type of item to be excluded. Accepted values are faults, tables, combo, or null (when op is either null or listall). Type, varchar.

exlusion_list

is a comma-separated list of faults, tables, table and fault entries, or nulls. Type, varchar.

Examples

Example 1

Excludes the tables syslogs and syscomments from sp_dbcc_faultreport processing on all databases:

sp_dbcc_exclusions null, 'add', 'tables', 'syslogs, syscomments'

Example 2

Excludes fault type 100036 from processing of the database my_db:

sp_dbcc_exclusions my_db, 'add', 'faults', '100036'

Example 3

Adds the following to the exclusion list corresponding to my_db: fault type 100002 pertaining to table mytable and fault type 100035 pertaining to syslogs:

sp_dbcc_exclusions my_db, 'add', 'combo', ‘mytable:100002, syslogs:100035’

Example 4

Removes fault type 100036 from the exclusion list corresponding to my_db:

sp_dbcc_exclusions my_db, 'drop', 'faults', '100036'

Example 5

Displays the exclusion list corresponding to my_db:

sp_dbcc_exclusions my_db

Example 6

Displays the recorded exclusions for all databases:

sp_dbcc_exclusions null, 'listall'

Usage

Permissions

Only a System Administrator can run sp_dbcc_exclusions without restriction.





Copyright © 2005. Sybase Inc. All rights reserved. sp_dbcc_faultreport

View this book as PDF