共用方式為


當您嘗試啟動時 SQL Server 代理程式損毀

本文討論當您在 SQL Server 實例中建立多個作業時,SQL Server Agent 服務所遇到的問題。

原始產品版本: SQL Server
原始 KB 編號: 2795690

徵兆

當您嘗試啟動 SQL Server 代理程式或需要比預期更長的時間啟動時,SQL Server 代理程式會當機。 此外,您可能會遇到下列一或多個案例:

  • 案例 1:下列錯誤訊息會記錄在系統事件記錄檔中:

    服務未及時回應啟動或控制要求。

  • 案例 2:代理程式的狀態會在 控制台 中顯示為「正在啟動」,且下列錯誤訊息會記錄在SQLAgent.log檔案中

    尚未定義閑置的CPU條件 - OnIdle 作業排程將不會有任何作用。

    此外,下列專案可能會記錄在 SQLAgent.log 檔案中

    <Time Stamp> - ? [431] Populating subsystems cache... \
    <Time Stamp> - ? [432] There are 7 subsystems in the subsystems cache \
    <Time Stamp> - ? [124] Subsystem 'ActiveScripting' successfully loaded (maximum concurrency: 40)\
    <Time Stamp> - ? [124] Subsystem 'ANALYSISCOMMAND' successfully loaded (maximum concurrency: 400)\
    <Time Stamp> - ? [124] Subsystem 'ANALYSISQUERY' successfully loaded (maximum concurrency: 400)\
    <Time Stamp> - ? [124] Subsystem 'CmdExec' successfully loaded (maximum concurrency: 40)\
    <Time Stamp> - ? [124] Subsystem 'PowerShell' successfully loaded (maximum concurrency: 2)\
    <Time Stamp> - ? [124] Subsystem 'SSIS' successfully loaded (maximum concurrency: 400)\
    <Time Stamp> - ? [124] Subsystem 'TSQL' successfully loaded (maximum concurrency: 80)\
    <Time Stamp> - ! [364] The Messenger service has not been started - NetSend notifications will not be sent\
    <Time Stamp> - ? [129] SQLSERVERAGENT starting under Windows NT service control\
    <Time Stamp> - + [396] An idle CPU condition has not been defined - OnIdle job schedules will have no effect\
    <Time Stamp> - ? [110] Starting SQLServerAgent Monitor using '' as the notification recipient...\
    <Time Stamp> - ? [146] Request servicer engine started\
    <Time Stamp> - ? [133] Support engine started\
    <Time Stamp> - ? [167] Populating job cache...\
    <Time Stamp> - ? [131] SQLSERVERAGENT service stopping due to a stop request from a user, process, or the OS...\
    <Time Stamp> - ? [134] Support engine stopped\
    <Time Stamp> - ? [197] Alert engine stopped\
    <Time Stamp> - ? [168] There are 4731 job(s) [0 disabled] in the job cache\
    <Time Stamp> - ? [170] Populating alert cache...\
    <Time Stamp> - ? [171] There are 0 alert(s) in the alert cache\
    <Time Stamp> - ? [149] Request servicer engine stopped\
    <Time Stamp> - ? [248] Saving NextRunDate/Times for all updated job schedules...\
    <Time Stamp> - ? [249] 0 job schedule(s) saved\
    <Time Stamp> - ? [127] Waiting for subsystems to finish...\
    <Time Stamp> - ? [128] Subsystem 'ActiveScripting' stopped (exit code 1)\
    <Time Stamp> - ? [128] Subsystem 'ANALYSISCOMMAND' stopped (exit code 1)\
    <Time Stamp> - ? [128] Subsystem 'ANALYSISQUERY' stopped (exit code 1)\
    <Time Stamp> - ? [128] Subsystem 'CmdExec' stopped (exit code 1)\
    <Time Stamp> - ? [128] Subsystem 'PowerShell' stopped (exit code 1)\
    <Time Stamp> - ? [128] Subsystem 'SSIS' stopped (exit code 1)\
    <Time Stamp> - ? [175] Job scheduler engine stopped\
    
  • 案例 3:資料庫引擎伺服器會顯示來自 “SQLAgent - 一般重新整理器” 服務的 SQL Server 進程識別碼 (SPID)。 此外,下列作業會顯示為在SPID的輸入緩衝區中執行:

EXECUTE msdb.dbo.sp_sqlagent_refresh_job

注意

SPID 處於 RUNNABLE 狀態,並定期等候 PREEMPTIVE_OS_LOOKUPACCOUNTSID 等候類型,或 SPID 處於等候類型的等候狀態 ASYNC_NETWORK_IO

原因

發生此問題的原因是 SQL Server 中有多個作業專案。

注意

如果您無意中為 Reporting Services 組態管理員中的報表設定多個訂閱,也可能會發生此問題。

因應措施

若要解決此問題,請刪除您不需要的工作。

注意

如果有許多作業專案,因為您無意中設定了許多訂用帳戶,請使用 Reporting Services 組態管理員刪除不必要的訂用帳戶。

其他相關資訊