Updates the dbcc_config table in dbccdb with the configuration information of the target database.
sp_dbcc_updateconfig dbname, type, "str1" [, "str2"]
is the name of the target database for which configuration information is being updated. To configure the default values, enter a null dbname parameter.
specifies the type name from the dbcc_types table. Table 4-2 shows the valid values for type.
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.
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.
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"
This sets the max worker processes to 2:
sp_dbcc_updateconfig null, 'max worker processes', '2'
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"
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
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
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"
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"
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"
Enables automatic workspace expansion for the database my_db:
sp_dbcc_updateconfig my_db, "enable automatic workspace expansion", "1"
sp_dbcc_updateconfig updates the dbcc_config table for the target database.
If the name of the target database is dbccdb, and the database dbccalt exists, sp_dbcc_updateconfig updates the dbcc_config table in dbccalt.
If the target database name is not found in dbcc_config, sp_dbcc_updateconfig adds it and sets the operation sequence number to 0 before updating other configuration information.
If the expected value for the specified type is a number, sp_dbcc_updateconfig converts the values you provide for str1 and str2 to numbers.
Table 4-2 shows the valid type names to use for type and the expected value for str1 or str2.
type name |
Value expected for str1 or str2 |
---|---|
dbcc named cache |
The name of the cache, specified by str1, and the new size (in kilobytes or megabytes) or the number of 2K pages, specified by str2. |
IO error abort |
The new error count, specified by str1. The value must be a number greater than 0. str2 is not used with this type. |
linkage error abort |
The new linkage error count value specified in str1. The value must be a number greater than 0. str2 is not used with this type. |
max worker processes |
The new number of worker processes, specified by str1. The value must be a number greater than 0. str2 is not used with this type. |
OAM count threshold |
The new threshold count, specified by str1. The value must be a number greater than 0. str2 is not used with this type. |
scan workspace |
The new name for the scan workspace, specified by str1. str2 is not used with this type. |
text workspace |
The new name of the text workspace, specified by str1. str2 is not used with this type. |
automatic workspace expansion |
Allows checkstorage to automatically expands the workspace if adequate space is available on the respective segments. The default value of 1 enables automatic workspace expansion, and the value of 0 disables it. |
The OAM count threshold parameter
represents the percentage by which the actual row count can vary
from the row count (as reported by the OAM pages) before dbcc
checkstorage raises error 100025, row
count error
. Generally, you can leave OAM
count threshold at the default value of 2%.
See the System Administration Guide for more information on the type names and values.
The permission checks for sp_dbcc_updateconfig differ based on your granular permissions settings.
Granular permissions 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. |
Granular permissions disabled |
With granular permissions disabled, you must be the database owner of the specifed database or a user with sa_role. |
Commands dbcc
dbcc stored procedures sp_dbcc_alterws, sp_dbcc_evaluatedb
System procedures sp_plan_dbccdb