다음을 통해 공유


ConfigValue Object

Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 말고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.

The ConfigValue object represents the attributes of a single Microsoft SQL Server configuration option.

현재 개체를 보여 주는 SQL-DMO 개체 모델

Properties

CurrentValue Property

MinimumValue Property

DynamicReconfigure Property

Name Property

ID Property

RunningValue Property

MaximumValue Property

주의

Some SQL Server configuration options do not take effect until the SQL Server service (MSSQLServer) has been stopped and restarted. You can force the server to immediately accept changes in some options by using the ReconfigureWithOverride method. The DynamicReconfigure property indicates whether the ConfigValue object requires a restart.

The ConfigValue object contains four value properties. The MinimumValue and MaximumValue properties represent bounds for the given configuration option. The RunningValue property indicates the current setting of the option on an instance of SQL Server. Before you change the configuration option setting, the CurrentValue and the RunningValue properties return identical values.

Set the CurrentValue property to change the setting of the given SQL Server configuration option. Undo your changes by resetting the CurrentValue property to the value of the RunningValue property. After a change is applied, the values of these two properties are again equal.

To set a configuration option

  1. Get the Configuration object from a connected SQLServer object.

  2. Get the ConfigValue object of the configuration option you want from the ConfigValues collection of the Configuration object.

  3. Set the CurrentValue property of the ConfigValue object to reflect the change you want.

  4. Use either the ReconfigureCurrentValues or the ReconfigureWithOverride method of the Configuration object to apply the change to the instance of SQL Server.

  5. If the ConfigValue object requires a restart to take effect (the value of DynamicReconfigure is FALSE), use the Shutdown and Start methods of the SQLServer object to restart the server with the changed configuration options.