設定 priority boost 伺服器組態選項Configure the priority boost Server Configuration Option

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

此主題描述如何使用 ,在 SQL ServerSQL Server 中設定 SQL Server Management StudioSQL Server Management Studio priority boost Transact-SQLTransact-SQL伺服器組態選項。This topic describes how to configure the priority boost configuration option in SQL ServerSQL Server by using SQL Server Management StudioSQL Server Management Studio or Transact-SQLTransact-SQL. 使用 priority boost 選項,指定 MicrosoftMicrosoft SQL ServerSQL Server 是否應以高於同一部電腦上其他處理序的 MicrosoftMicrosoft Windows 2008 或 Windows 2008 R2 排程優先權執行。Use the priority boost option to specify whether MicrosoftMicrosoft SQL ServerSQL Server should run at a higher MicrosoftMicrosoft Windows 2008 or Windows 2008 R2 scheduling priority than other processes on the same computer. 如果將此選項設定為 1, SQL ServerSQL Server 在 Windows 2008 或 Windows Server 2008 R2 排程器中會以優先權基底 13 執行。If you set this option to 1, SQL ServerSQL Server runs at a priority base of 13 in the Windows 2008 or Windows Server 2008 R2 scheduler. 預設值是 0,也就是優先權基底 7。The default is 0, which is a priority base of 7.

重要

未來的 Microsoft SQL Server 版本將移除這項功能。This feature will be removed in a future version of Microsoft SQL Server. 請勿在新的開發工作中使用此功能,並且儘速修改使用此功能的應用程式。Do not use this feature in new development work, and modify applications that currently use this feature as soon as possible.

本主題內容In This Topic

開始之前Before You Begin

限制事項Limitations and Restrictions

  • 過度提高優先權可能會耗盡必要作業系統和網路功能的資源,導致 SQL Server 關機時或使用伺服器上的其他作業系統工作時出現問題。Raising the priority too high may drain resources from essential operating system and network functions, resulting in problems shutting down SQL Server or using other operating system tasks on the server.

安全性Security

權限Permissions

不含參數或只含第一個參數之 sp_configure 上的執行權限預設會授與所有使用者。Execute permissions on sp_configure with no parameters or with only the first parameter are granted to all users by default. 以同時設定兩個參數的 sp_configure 來變更組態選項或執行 RECONFIGURE 陳述式時,使用者必須取得 ALTER SETTINGS 伺服器層級權限。To execute sp_configure with both parameters to change a configuration option or to run the RECONFIGURE statement, a user must be granted the ALTER SETTINGS server-level permission. 系統管理員 (sysadmin)serveradmin 固定伺服器角色會隱含 ALTER SETTINGS 權限。The ALTER SETTINGS permission is implicitly held by the sysadmin and serveradmin fixed server roles.

使用 SQL Server Management StudioUsing SQL Server Management Studio

若要設定 priority boost 選項To configure the priority boost option

  1. 在物件總管中,請以滑鼠右鍵按一下伺服器,然後選取 [屬性] 。In Object Explorer, right-click a server and select Properties.

  2. 按一下 [處理器] 節點。Click the Processors node.

  3. [執行緒] 下,選取 [提高 SQL Server 優先權] 核取方塊。Under Threads, select the Boost SQL Server priority check box.

  4. 停止 SQL ServerSQL Server並重新啟動。Stop and restart SQL ServerSQL Server.

使用 Transact-SQLUsing Transact-SQL

若要設定 priority boost 選項To configure the priority boost option

  1. 連接到 Database EngineDatabase EngineConnect to the Database EngineDatabase Engine.

  2. 在標準列中,按一下 [新增查詢]From the Standard bar, click New Query.

  3. 複製下列範例並將其貼到查詢視窗中,然後按一下 [執行]Copy and paste the following example into the query window and click Execute. 此範例示範如何使用 sp_configurepriority boost 選項的值設定為 1This example shows how to use sp_configure to set the value of the priority boost option to 1.

USE AdventureWorks2012 ;  
GO  
EXEC sp_configure 'show advanced options', 1;  
GO  
RECONFIGURE ;  
GO  
EXEC sp_configure 'priority boost', 1 ;  
GO  
RECONFIGURE;  
GO  
  

如需詳細資訊,請參閱 伺服器設定選項 (SQL Server)伺服器組態選項。For more information, see Server Configuration Options (SQL Server).

後續操作:設定優先權提升選項之後Follow Up: After you configure the priority boost option

伺服器必須重新啟動之後,設定才能生效。The server must be restarted before the setting can take effect.

另請參閱See Also

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