sp_dbcc_updateconfig

Description

Updates the dbcc_config table in dbccdb with the configuration information of the target database.

Syntax

sp_dbcc_updateconfig dbname, type, "str1" [, "str2"]

Parameters

dbname

is the name of the target database for which configuration information is being updated. To configure the default values, enter a null dbname parameter.

type

specifies the type name from the dbcc_types table. Table 4-2 shows the valid values for type.

str1

specifies the first configuration value for the specified type to be updated in the dbcc_config table. Table 4-2 describes the expected value of str1 for the specified type.

str2

specifies the second configuration value for the specified type that you want to update in the dbcc_config table. Table 4-2 describes the expected value of str2 for the specified type.

Examples

Example 1

Updates dbcc_config with the maximum number of worker processes for dbcc checkstorage to use when checking the pubs2 database. The new maximum number of worker processes is 4:

sp_dbcc_updateconfig pubs2, "max worker processes", "4"

Example 2

This sets the max worker processes to 2:

sp_dbcc_updateconfig null, 'max worker processes', '2'

Example 3

Updates dbcc_config with the size of the dbcc named cache “pubs2_cache”. The new size is 10K:

sp_dbcc_updateconfig pubs2, "dbcc named cache", pubs2_cache, "10K"

Example 4

Updates dbcc_config with the new name of the scan workspace for the pubs2 database. The new name is scan_pubs2. This update is made after using sp_dbcc_alterws to change the name of the scan workspace:

sp_dbcc_updateconfig pubs2, "scan workspace", scan_pubs2

Example 5

Updates dbcc_config with the new name of the text workspace for the pubs2 database. The new name is text_pubs2. This update is made after using sp_dbcc_alterws to change the name of the text workspace:

sp_dbcc_updateconfig pubs2, "text workspace", text_pubs2

Example 6

Updates dbcc_config with the OAM count threshold value for the pubs2 database. The new value is 5:

sp_dbcc_updateconfig pubs2, "OAM count threshold", "5"

Example 7

Updates dbcc_config with the I/O error abort value for the pubs2 database. The new value is 3:

sp_dbcc_updateconfig pubs2, "IO error abort", "3"

Example 8

Updates dbcc_config with the linkage error abort value for the pubs2 database. The new value is 8:

sp_dbcc_updateconfig pubs2, "linkage error abort", "8"

Example 9

Enables automatic workspace expansion for the database my_db:

sp_dbcc_updateconfig my_db, "enable automatic workspace expansion", "1"

Usage

Permissions

Only a System Administrator or the Database Owner can run sp_dbcc_updateconfig.

See also

Commands dbcc

dbcc stored procedures sp_dbcc_alterws, sp_dbcc_evaluatedb

System procedures sp_plan_dbccdb