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:
- Go to Start > Control Panel > Administrative Tools > Services.
- Select SMA OpCon Agent for SQL in the Services list. The SMA OpCon Agent for SQL Properties window displays.
- Confirm that the Startup Type is set to Automatic (Delayed Start). If it is not, complete the following steps:
- Select Automatic (Delayed Start) from the Startup Type list.
- Select OK.
- Go to Action and select Start.
- Confirm the Status is Started.
- Close the Services window.
:::tip 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.
:::caution 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:
- Go to Start > Control Panel > Administrative Tools > Services.
- Select SMA OpCon Agent for SQL in the Services list.
- Go to Action and select Stop.
- Confirm the Status is Stopped.
- Close the Services window.
Related topics
- Service configuration options — Configure the account the service runs as.
- SQLAgent.ini file configuration — Settings that require a service restart.
- Upgrade installation — Full upgrade flow including job draining.