Configuring SQL Server for Optimal Performance
From SQLServerPedia
|
See Also: Performance Tuning SQL Server has numerous configuration options that affect how it uses resources. These options are set at the server level - that is all connections and all databases on a particular instance of SQL Server will share this configuration.SQL Server behavior can also be altered for a specific database or even a connection. Such options typically don't affect performance; rather they specify how SQL Server handles data, how data integrity is maintained in each database and whether some advanced features are used. Configuring SQL ServerAs before, you can configure an instance of SQL Server by executing sp_configure system stored procedure or through graphical tools: SQL Server Management Studio, SQL Server Configuration Manager and SQL Server Surface Area Configuration. Review all configuration options by querying sys.configurations view in master database. If the column "is_dynamic", has a value of 1, the option takes effect when you execute the RECONFIGURE statement. If the same column has a value of zero, restart SQL Server in order for the new value to take effect. Microsoft made an effort to make the large majority of configuration options dynamic - only 15 of 63 options require you to restart SQL Server service in order to take effect.
You can also review available configuration options by executing sp_configure procedure without supplying any parameters. The output will show minimum and maximum values for each option, configured value and running value. If a configuration setting requires restarting the SQL Server service, then the configured value might differ from the running value. This means the service hasn't been restarted since the configuration setting value was changed. Those settings which do not require a restart can be applied by executing RECONFIGURE WITH OVERRIDE statement. For most settings running "RECONFIGURE" will suffice, but "RECONFIGURE WITH OVERRIDE" will work for all settings. You will notice that by default sp_configure system procedure only returns 14 configuration options; this is because "is_advanced" column within sys.configurations view has a value of 0 for 14 configuration options. Before you can view or modify any other configuration option you must execute: sp_configure 'show advanced options', 1 GO RECONFIGURE WITH OVERRIDEStarting with SQL Server 2005 the preferred way of configuring database options is by using ALTER DATABASE statement. Although sp_dboption system procedure is still available it doesn't support any new options. This procedure is deprecated and will be removed in future releases of the software. You can also change database level configuration settings using SQL Server Management Studio from database properties' dialog. |