Udostępnij za pomocą


Agent programu SQL Server ulega awarii podczas próby uruchomienia

W tym artykule omówiono problemy występujące w usłudze agenta programu SQL Server podczas tworzenia wielu zadań w wystąpieniu programu SQL Server.

Oryginalna wersja produktu: SQL Server
Oryginalny numer KB: 2795690

Symptomy

Agent programu SQL Server ulega awarii, gdy próbujesz go uruchomić lub trwa dłużej niż oczekiwano. Ponadto może wystąpić co najmniej jeden z następujących scenariuszy:

  • Scenariusz 1. W dzienniku zdarzeń systemu jest rejestrowany następujący komunikat o błędzie:

    Usługa nie odpowiedziała na żądanie uruchamiania ani kontroli w odpowiednim czasie.

  • Scenariusz 2. Stan agenta jest wyświetlany jako "Uruchamianie" w Panel sterowania, a następujący komunikat o błędzie jest rejestrowany w pliku SQLAgent.log:

    Nie zdefiniowano warunku bezczynności procesora CPU — harmonogramy zadań OnIdle nie będą miały wpływu.

    Ponadto w pliku SQLAgent.log mogą być rejestrowane następujące wpisy:

    <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\
    
  • Scenariusz 3. Serwer aparatu bazy danych wyświetla identyfikator procesu programu SQL Server (SPID) z usługi "SQLAgent — generic Refresher". Ponadto następujące zadanie jest wyświetlane jako uruchomione w buforze wejściowym SPID:

EXECUTE msdb.dbo.sp_sqlagent_refresh_job

Uwaga 16.

SPID jest w stanie RUNNABLE i regularnie czeka na PREEMPTIVE_OS_LOOKUPACCOUNTSID typ oczekiwania lub SPID jest w stanie oczekiwania na ASYNC_NETWORK_IO typ oczekiwania.

Przyczyna

Ten problem występuje, ponieważ w programie SQL Server istnieje wiele wpisów zadań.

Uwaga 16.

Problem może również wystąpić, jeśli przypadkowo skonfigurowano wiele subskrypcji dla raportów w programie Reporting Services Configuration Manager.

Rozwiązanie

Aby obejść ten problem, usuń zadania, których nie potrzebujesz.

Uwaga 16.

Jeśli istnieje wiele wpisów zadań, ponieważ przypadkowo skonfigurowaliśmy wiele subskrypcji, usuń niepotrzebne subskrypcje przy użyciu programu Reporting Services Configuration Manager.

Więcej informacji