共用方式為


傳送 SQL Server Agent 錯誤訊息

本主題描述如何使用 SQL Server Management Studio,在 SQL Server 2014 中設定Microsoft SQL Server Agent,以透過 net send 傳送錯誤訊息。

本主題內容

開始之前

限制與制約

  • 如果您有權使用它,[物件總管] 只會顯示 SQL Server Agent 節點。

  • Microsoft Windows Messenger 服務必須執行才能接收 net send 事件。

安全

權限

若要執行其功能,SQL Server Agent 必須設定為使用屬於 SQL Server 中 系統管理員 固定伺服器角色成員之帳戶的認證。 帳戶必須具有下列 Windows 許可權:

  • 以服務身份登入(SeServiceLogonRight)

  • 替換程序級別令牌 (SeAssignPrimaryTokenPrivilege)

  • 略過路徑檢查(SeChangeNotifyPrivilege)

  • 調整程式的記憶體配額 (SeIncreaseQuotaPrivilege)

如需 SQL Server Agent 服務帳戶所需 Windows 許可權的詳細資訊,請參閱 選取 SQL Server Agent 服務的帳戶設定 Windows 服務帳戶和許可權

使用 SQL Server Management Studio

傳送 SQL Server Agent 錯誤訊息

  1. [物件總管]中,按一下加號展開伺服器,其中包含您要透過 net send 傳送錯誤訊息的 SQL Server Agent 錯誤日誌。

  2. 以滑鼠右鍵按一下 SQL Server 代理程式 ,再選取 [屬性]

  3. 在 [SQL Server Agent 屬性 -server_name] 對話框中,於 [[一般] 頁面的 [錯誤記錄] 下,輸入您要在 [Net send recipient] 方塊中傳送錯誤訊息的用戶名稱或計算機名稱。

  4. 按一下 [確定]