Setting Configuration Options

You can manage and optimize Microsoft® SQL Server™ resources through configuration options by using SQL Server Enterprise Manager or the sp_configure system stored procedure. The most commonly used server configuration options are available through SQL Server Enterprise Manager; all configuration options are accessible through sp_configure.

Compared to earlier versions, SQL Server version 7.0 has more internal features for self-tuning and reconfiguring. These features reduce the need for setting server configuration options manually. You should consider the effects on your system carefully before setting these options.

Using the sp_configure System Stored Procedure

When using sp_configure, you must run either RECONFIGURE or RECONFIGURE WITH OVERRIDE after setting a configuration option. Although the RECONFIGURE WITH OVERRIDE statement is usually reserved for configuration options that should be used with extreme caution (for example, setting the allow updates option to 1 allows users to update fields in system tables), you can also use it in place of RECONFIGURE (that is, RECONFIGURE WITH OVERRIDE works for all configuration options).

Following is an example of a script you would use with sp_configure to change the fill factor option from its default setting to a value of 100:

sp_configure 'fill factor', 100

GO

RECONFIGURE

GO

  

Categories of Configuration Options

Configuration options either take effect:

Advanced options are those that should be changed only by a knowledgeable system administrator or certified SQL Server technician.

To configure an advanced option with sp_configure, you must first run sp_configure with the show advanced options option set to 1, and then run RECONFIGURE.

sp_configure 'show advanced options', 1

GO

RECONFIGURE

GO

sp_configure 'resource timeout', 100

GO

RECONFIGURE

GO

  

In the earlier example, reconfiguring the resource timeout option to a new value takes place immediately. If you run sp_configure again, the new value for resource timeout appears in the configuration options run_value column.

Some options require a server stop and restart before the new configuration value takes effect. For example, you cannot configure the affinity mask option until you set show advanced options to 1, run RECONFIGURE, and stop and restart the server. If you set the new value and run sp_configure before stopping and restarting the server, the new value appears in the configuration options config_value column, but not in the run_value column. After stopping and restarting the server, the new value appears in the run_value column.

If you use SQL Server Enterprise Manager to change a configuration option, and the configuration option requires a server stop and restart to take effect, SQL Server displays a dialog box asking whether you want to stop and restart the server.

Self-configuring options are those that SQL Server adjusts according to the needs of the system. In most cases, this eliminates the need for setting the values manually. Examples include the min server memory and max server memory options, and the user connections option.

Configuration Options Table

The following table lists all available configuration options, the range of possible settings, and default values. Letter codes next to a configuration option indicate:

Configuration option Minimum Maximum Default
affinity mask (A, RR) 0 2147483647 0
allow updates 0 1 0
cost threshold for parallelism (A) 0 32767 5
cursor threshold (A) –1 2147483647 -1
default language 0 9999 0
default sortorder id (A, RR) 0 255 52
extended memory size (A, RR) 0 2147483647 0
fill factor (A, RR) 0 100 0
index create memory (A, SC) 0 1600000 1216
language in cache (RR) 3 100 3
language neutral full-text (A) 0 1 0
lightweight pooling (A, RR) 0 1 0
locks (A, RR, SC) 5000 2147483647 0
max async IO (A, RR) 1 255 32
max degree of parallelism (A) 0 32 0
max server memory (A, SC) 0 2147483647 2147483647
max text repl size 0 2147483647 65536
max worker threads (A, RR) 10 1024 255
media retention (A, RR) 0 365 0
min memory per query (A) 512 2147483647 1024
min server memory (A, SC) 0 2147483647 0
nested triggers 0 1 1
network packet size (A) 512 32767 4096
open objects (A, RR, SC) 0 2147483647 500
priority boost (A, RR) 0 1 0
query governor cost limit (A) 0 2147483647 0
query wait (A) 0 2147483647 600
recovery interval (A, SC) 0 32767 0
remote access (RR) 0 1 1
remote login timeout 0 2147483647 5
remote proc trans 0 1 0
remote query timeout 0 2147483647 0
resource timeout (A) 5 2147483647 10
scan for startup procs (A, RR) 0 1 0
set working set size (A, RR) 0 1 0
show advanced options 0 1 1
spin counter (A) 0 2147483647 0, 10000
time slice (A, RR) 50 1000 100
two digit year cutoff 1753 9999 2049
Unicode comparison style (A, RR) 0 2147483647 196609
Unicode locale id (A, RR) 0 2147483647 1033
user connections (A, RR, SC) 0 32767 0
user options 0 4095 0

See Also
sp_configure Using Options in SQL Server

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.