Skip to main content

Manage the SQL Agent service

What is it?

The SQL Agent runs as a Windows service. Use the Windows Service Control Manager to start and stop the service whenever you need to:

  • Apply changes to non-dynamic settings in SQLAgent.ini.
  • Recover from a hung agent.
  • Pause the agent for maintenance.
  • Confirm the service is up after a host reboot.

The procedures below walk through both directions.

Start the agent

Start the agent after a stop, after a reboot if the service did not auto-start, or after changing non-dynamic settings.

To start the SQL Agent, complete the following steps:

  1. Use the menu path: Start > Control Panel.
  2. Double-click Administrative Tools.
  3. Double-click Services to run the Service Control Manager.
  4. Double-click SMA OpCon Agent for SQL in the Services list. The SMA OpCon Agent for SQL Properties dialog displays.
  5. Confirm that the Service's Startup Type is set to Automatic (Delayed Start). If it is not, change the Startup type with the following steps:
    1. Select Automatic (Delayed Start) from the Startup Type list.
    2. Select OK.
  6. Use the menu path: Action > Start.
  7. Confirm the Service's Status is Started.
  8. Close ☒ the Services window.
Why Automatic (Delayed Start)?

Delayed Start lets other system services and dependencies finish initializing before the SQL Agent comes up, which avoids a class of startup-timing failures. SMA Technologies recommends this setting.

Stop the agent

Stop the agent before applying upgrades, changing static settings, or doing maintenance that requires the service to be down.

Drain running jobs first

Stopping the service while jobs are running can leave those jobs without final status reporting. Confirm running jobs are at 0 before you stop the service. See the Check for running jobs procedure in Upgrade installation for the full drain procedure.

To stop the SQL Agent, complete the following steps:

  1. Use the menu path: Start > Control Panel.
  2. Double-click Administrative Tools.
  3. Double-click Services to run the Service Control Manager.
  4. Select SMA OpCon Agent for SQL in the Services list.
  5. Use the menu path: Action > Stop.
  6. Confirm the agent's Status is Stopped.
  7. Close ☒ the Services window.