RECONFIGURE (Transact-SQL)RECONFIGURE (Transact-SQL)

適用於: 是SQL Server 否Azure SQL Database 否Azure SQL 資料倉儲 否平行處理資料倉儲 APPLIES TO: yesSQL Server noAzure SQL Database noAzure SQL Data Warehouse noParallel Data Warehouse

更新 sp_configure 系統預存程序所變更之設定選項目前所設定的值 (sp_configure 結果集中的 config_value 資料行)。Updates the currently configured value (the config_value column in the sp_configure result set) of a configuration option changed with the sp_configure system stored procedure. 由於部分設定選項需要停止再重新啟動伺服器,才能更新目前正在執行的值,因此,RECONFIGURE 不一定會針對變更的設定值來更新目前正在執行的值 (sp_configure 結果集中的 run_value 資料行)。Because some configuration options require a server stop and restart to update the currently running value, RECONFIGURE does not always update the currently running value (the run_value column in the sp_configure result set) for a changed configuration value.

主題連結圖示 Transact-SQL 語法慣例Topic link icon Transact-SQL Syntax Conventions

語法Syntax

    
RECONFIGURE [ WITH OVERRIDE ]    

引數Arguments

RECONFIGURERECONFIGURE
指定如果組態設定不需要停止再重新啟動伺服器,便應該更新目前在執行的值。Specifies that if the configuration setting does not require a server stop and restart, the currently running value should be updated. 另外,RECONFIGURE 也會檢查新的設定值中是否存有無效值 (例如,不存在於 syscharsets 的排列順序值) 或非建議值。RECONFIGURE also checks the new configuration values for either values that are not valid (for example, a sort order value that does not exist in syscharsets) or nonrecommended values. 當使用不需要停止再重新啟動伺服器的組態選項時,在指定 RECONFIGURE 之後,組態選項目前在執行的值和目前已設定的值應該相同。With those configuration options not requiring a server stop and restart, the currently running value and the currently configured values for the configuration option should be the same value after RECONFIGURE is specified.

WITH OVERRIDEWITH OVERRIDE
停用 recovery interval 進階設定選項的設定值檢查 (用以找出無效值或非建議值)。Disables the configuration value checking (for values that are not valid or for nonrecommended values) for the recovery interval advanced configuration option.

幾乎所有設定選項都可使用 WITH OVERRIDE 選項重新設定,不過,仍要避免一些嚴重錯誤。Almost any configuration option can be reconfigured by using the WITH OVERRIDE option, however some fatal errors are still prevented. 例如,您無法將 min server memory 設定選項的值設為大於 max server memory 設定選項所指定的值。For example, the min server memory configuration option cannot be configured with a value greater than the value specified in the max server memory configuration option.

RemarksRemarks

sp_configure 不接受針對各個設定選項,使用超出所記載之有效範圍的新設定選項值。sp_configure does not accept new configuration option values out of the documented valid ranges for each configuration option.

在明確或隱含的交易中,不允許使用 RECONFIGURE。RECONFIGURE is not allowed in an explicit or implicit transaction. 當您同時重新設定數個選項時,若有任何重新設定作業失敗,則所有重新設定作業都不會生效。When you reconfigure several options at the same time, if any of the reconfigure operations fail, none of the reconfigure operations will take effect.

重新設定 Resource Governor 時,請參閱 ALTER RESOURCE GOVERNOR (Transact-SQL) 的 RECONFIGURE 選項。When reconfiguring the resource governor, see the RECONFIGURE option of ALTER RESOURCE GOVERNOR (Transact-SQL).

權限Permissions

RECONFIGURE 權限預設給 ALTER SETTINGS 權限的被授與者。RECONFIGURE permissions default to grantees of the ALTER SETTINGS permission. sysadminserveradmin 固定伺服器角色會隱含地持有這個權限。The sysadmin and serveradmin fixed server roles implicitly hold this permission.

範例Examples

下列範例將 recovery interval 組態選項的上限設為 75 分鐘,並利用 RECONFIGURE WITH OVERRIDE 來安裝它。The following example sets the upper limit for the recovery interval configuration option to 75 minutes and uses RECONFIGURE WITH OVERRIDE to install it. 不建議您使用超出 60 分鐘的復原間隔,依預設,不會接受這個值。Recovery intervals greater than 60 minutes are not recommended and disallowed by default. 不過,由於指定了 WITH OVERRIDE 選項,SQL ServerSQL Server 並不會檢查指定的值 (75) 是否為 recovery interval 組態選項的有效值。However, because the WITH OVERRIDE option is specified, SQL ServerSQL Server does not check whether the value specified (75) is a valid value for the recovery interval configuration option.

EXEC sp_configure 'recovery interval', 75    
RECONFIGURE WITH OVERRIDE;    
GO    

另請參閱See Also

伺服器組態選項 (SQL Server) Server Configuration Options (SQL Server)
sp_configure (Transact-SQL)sp_configure (Transact-SQL)