重要
在 Azure SQL 受控實例上,目前支援大部分但並非所有 SQL Server Agent 功能。 如需詳細資訊,請參閱 與 SQL Server 的 Azure SQL 受控實例 T-SQL 差異。
本主題描述如何設定 Microsoft SQL Server Agent,使其在意外停止時自動重新啟動。
開始之前
限制與限制條件
如果您有權使用它,[物件總管] 只會顯示 SQL Server Agent 節點。
安全
權限
若要執行其功能,SQL Server Agent 必須設定為使用屬於 SQL Server 中 系統管理員 固定伺服器角色成員之帳戶的認證。 帳戶必須具有下列 Windows 許可權:
Log on as a service (SeServiceLogonRight)
Replace a process-level token (SeAssignPrimaryTokenPrivilege)
Bypass traverse checking (SeChangeNotifyPrivilege)
Adjust memory quotas for a process (SeIncreaseQuotaPrivilege)
Note
若要讓自動重新啟動正常運作,執行 SQL Server Agent 服務的帳戶必須是伺服器上的本機系統管理員。
如需 SQL Server Agent 服務帳戶所需 Windows 許可權的詳細資訊,請參閱 選取 SQL Server Agent 服務的帳戶 和 設定 Windows 服務帳戶。
使用 SQL Server Management Studio
若要將 SQL Server Agent 設定為自動重新啟動
In Object Explorer, click the plus sign to expand the server where you want to configure SQL Server Agent to automatically restart.
以滑鼠右鍵點擊 SQL Server Agent,然後點擊 屬性。
On the General page, check Auto restart SQL Server Agent if it stops unexpectedly.