共用方式為


SQL Server 代理程式在您嘗試啟動時當機

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

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

徵狀

當您嘗試啟動代理程式時,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 - Generic Refresher” 服務 (SPID) 顯示 SQL Server 進程識別符。 此外,下列作業會在SPID的輸入緩衝區中顯示為執行中:

EXECUTE msdb.dbo.sp_sqlagent_refresh_job

注意事項

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

原因

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

注意事項

如果您在 Reporting Services Configuration Manager 中無意中為報表設定多個訂閱,也可能會發生此問題。

因應措施

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

注意事項

如果您因為不小心設定了許多訂用帳戶而有許多作業專案,請使用 Reporting Services Configuration Manager 刪除不必要的訂用帳戶。

其他相關資訊