Agent XPs 伺服器組態選項Agent XPs 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

使用 代理程式 XP 選項以啟用此伺服器上的 SQL ServerSQL Server Agent 擴充預存程序。Use the Agent XPs option to enable the SQL ServerSQL Server Agent extended stored procedures on this server. 未啟用此選項時,「 SQL ServerSQL Server 物件總管」中就沒有 SQL Server Management StudioSQL Server Management Studio Agent 節點可用。When this option is not enabled, the SQL ServerSQL Server Agent node is not available in SQL Server Management StudioSQL Server Management Studio Object Explorer.

當您使用 SQL Server Management StudioSQL Server Management Studio 工具來啟動 SQL ServerSQL Server Agent 服務時,就會自動啟用這些擴充預存程序。When you use the SQL Server Management StudioSQL Server Management Studio tool to start the SQL ServerSQL Server Agent service, these extended stored procedures are enabled automatically. 如需詳細資訊,請參閱< Surface Area Configuration>。For more information, see Surface Area Configuration.

注意

不論 SQL ServerSQL Server Agent 服務狀態為何,除非已啟用這些擴充預存程序,否則 Management StudioManagement Studio 物件總管不會顯示 SQL ServerSQL Server Agent 節點的內容。Management StudioManagement Studio Object Explorer does not display the contents of the SQL ServerSQL ServerAgent node unless these extended stored procedures are enabled regardless of the SQL ServerSQL Server Agent service state.

可能的值為:The possible values are:

  • 0,表示無法使用 SQL ServerSQL Server Agent 擴充預存程式 (預設值)。0, indicating that SQL ServerSQL Server Agent extended stored procedures are not available (the default).

  • 1,代表可使用 SQL ServerSQL Server Agent 擴充預存程式。1, indicating that SQL ServerSQL Server Agent extended stored procedures are available.

設定立即生效,伺服器不必停止再重新啟動。The setting takes effect immediately without a server stop and restart.

範例Example

下列範例會啟用 SQL ServerSQL Server Agent 擴充預存程序。The following example enables the SQL ServerSQL Server Agent extended stored procedures.

  1. 從 Microsoft SQL Server Management Studio,連接到資料庫引擎。From Microsoft SQL Server Management Studio connect to the Database Engine.

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

  3. 複製下列範例並將其貼到查詢視窗中,然後按一下 [執行]Copy and paste the following example into the query window and click Execute.

sp_configure 'show advanced options', 1;  
GO  
RECONFIGURE;  
GO  
sp_configure 'Agent XPs', 1;  
GO  
RECONFIGURE  
GO  

另請參閱See Also

自動化管理工作 (SQL Server Agent) Automated Administration Tasks (SQL Server Agent)
啟動、停止或暫停 SQL Server Agent 服務Start, Stop, or Pause the SQL Server Agent Service