Skip to content

Est. 2011ยทMicrosoft Partner 7033487ยทDelivery under 3 minยทSupport 7 days a week

Your vault is empty.

License Error 22022

Error 22022: SQLServerAgent Is Not Currently Running, or Does Not Exist

12 min read Updated October 5, 2026 SQL Server

Fix it now

Something asked SQL Server Agent to act and Agent was not there to act. Two very different situations produce the same message: the service is installed and stopped, which is a five-minute fix, or the instance is Express, where Microsoft’s editions tables list SQL Server Agent as not supported at all. Establish which before rebuilding anything.

Run on the instance that raised the error

SELECT SERVERPROPERTY('Edition') AS Edition, SERVERPROPERTY('ProductVersion') AS Version;
EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;
EXEC sp_configure 'Agent XPs';
  1. Read the edition. If it returns an Express edition, Agent is not part of it and no configuration produces one. Stop here and read the licensing section.
  2. On any other edition, open SQL Server Configuration Manager. The Agent service is named for the instance and should be Running with a start mode of Automatic.
  3. If it is stopped, start it there. If it refuses, or starts and stops within seconds, the Agent error log and the Windows Application log say why.
  4. Agent XPs enables itself when Agent starts, so a run value of 0 while the service claims to be running points at a start-up problem rather than a configuration one.

Agent XPs is an advanced option, so show advanced options has to be 1 first or sp_configure returns error 15123 and you will think you have found something.

If the job or maintenance plan runs, you are done. If the edition check returned Express, the next section explains what that means and what it does not.

Why it happens

This message comes from msdb rather than from the engine. Starting a job, running a maintenance plan, and every scheduled part of replication and log shipping goes through Agent, and each of those asks msdb to talk to the service. If the service is not running, the caller gets the refusal back. Nothing ran, nothing failed, and nothing is corrupt.

One thing worth knowing before you go looking it up: the number is not in Microsoft’s published error catalogue with this meaning. Message 22022 in sys.messages is an unrelated internal message whose text differs between releases. The “SQLServerAgent is not currently running” text you are looking at is produced by the Agent extended stored procedures rather than by a catalogued message, which is why searching Microsoft’s error tables for 22022 returns something that has nothing to do with Agent. Diagnose it by what it is telling you, not by the number.

Error 14258 is the polite relative and it is catalogued: cannot perform this operation while SQL Server Agent is starting, try again later. It clears within seconds, and seeing it repeatedly means Agent is failing in a loop rather than merely being slow.

The edition fact matters more than any of the troubleshooting. Microsoft’s editions tables for SQL Server 2022 and SQL Server 2025 both list SQL Server Agent as not supported on Express. There is no separate download and no optional component in setup that adds one. Scheduled jobs, maintenance plans, operators, alerts and the multi-step job model belong to the paid editions, and so does the scheduling that log shipping and replication depend on.

The instance is SQL Server Express

You have this one if SERVERPROPERTY('Edition') returns an Express edition and no Agent service exists for the instance in Configuration Manager.

  1. Stop looking for a configuration fix. There is not one, and reinstalling will not produce an Agent service.
  2. For simple work, schedule outside SQL Server: a Windows Task Scheduler task running sqlcmd against a script file takes a backup on a schedule perfectly well.
  3. For anything needing job history, retries, multiple steps, alerting, maintenance plans, log shipping or replication scheduling, move to an edition that includes Agent.

If you do upgrade the edition, Microsoft’s documentation notes that an Express instance needs post-upgrade steps: the SQL Server Agent service has to be enabled and its service account configured. It does not simply appear running.

The Agent service is stopped or set to start manually

You have this one if The service exists, is not running, and nobody remembers stopping it.

  1. Start it in SQL Server Configuration Manager and set the start mode to Automatic so it survives a reboot.
  2. Check the Windows Application log around the time it stopped. A patch that restarted services, or a failed dependency, is the usual answer.
  3. Retry the job that failed and confirm its history is recorded.

Agent starts and immediately stops again

You have this one if The service reports running for a few seconds and then stops, with 14258 appearing in the meantime.

  1. Read the Agent error log, from SSMS under SQL Server Agent, Error Logs, or as a file in the instance’s Log folder. Microsoft describes it as recording warnings and errors that usually require administrator intervention.
  2. Confirm the Agent service account can connect to the instance. If the instance is Windows authentication only and that account has no login, Agent cannot start whatever the service settings say.
  3. Give the account the rights it needs on the instance, then start the service and watch the log.

Change the Agent service account in SQL Server Configuration Manager rather than the Services console, so the associated permissions are applied with it.

Agent is running but the caller cannot use it

You have this one if Agent is up and sysadmins can start jobs, while other users still get the refusal.

  1. Grant the msdb roles that match what each person needs. Microsoft documents three: SQLAgentUserRole, SQLAgentReaderRole and SQLAgentOperatorRole, which is how access is controlled for anyone not in sysadmin.
  2. If job steps use proxies, remember members of those roles can only use proxies they have been granted specific access to.
  3. Check job ownership. A job owned by a login that no longer exists will not run for anybody.

It is LocalDB, not a normal instance

You have this one if The connection is to a LocalDB instance used by a development tool, and there is no service to look at.

  1. Confirm what you are connected to before troubleshooting a service that was never installed.
  2. Schedule the work from outside: Task Scheduler with sqlcmd, or move the database to a full instance.
  3. Treat this as a design question rather than a fault. LocalDB is a developer convenience, not a place to schedule production work.

Full reference

Which situation you are in

What you see What it means
The edition is Express Agent does not exist. Not a fault to fix
The service exists but is stopped Start it and set the start mode to Automatic
Agent starts then stops within seconds Read the Agent error log; usually the service account cannot connect
14258 repeatedly Agent is looping through failed starts
Agent XPs run value 0 while the service looks up The service has not actually completed startup
Sysadmins can run jobs, others cannot msdb role membership, or job ownership

What Express gives you instead, and what it costs

Capability Task Scheduler with sqlcmd SQL Server Agent
Run a script on a schedule Yes Yes
Job history and step outcomes No Yes
Retry logic and step flow control No Yes
Operators and alerts No Yes
Maintenance plans No Yes
Scheduling for log shipping and replication No Yes
Proxies for steps running under other credentials No Yes

Task Scheduler with sqlcmd genuinely works for single-step work such as a nightly backup script, and it costs nothing. What it cannot do is anything that has to be scheduled by SQL Server itself, which is why log shipping and replication are not on the table at all on Express rather than being merely inconvenient.

Where to look

Command or place What it gives you
SELECT SERVERPROPERTY('Edition'); The single fact that decides everything else here
SQL Server Configuration Manager Service state, service account and start mode, applied with the associated permissions
EXEC sp_configure 'Agent XPs'; Whether the Agent extended procedures are enabled. Set show advanced options first
SSMS, SQL Server Agent, Error Logs Agent’s own account of why it would not start
Windows Application log, SQLSERVERAGENT source Service start failures and job outcomes, though Microsoft does not publish the event IDs
msdb.dbo.sysjobs_view Job ownership, which is the usual reason a job runs for you and not for anyone else

The msdb roles, and what each is for

  • SQLAgentUserRole: the most restricted. Members work with jobs they own.
  • SQLAgentReaderRole: adds visibility of jobs owned by others.
  • SQLAgentOperatorRole: the broadest of the three, for people who need to act on jobs generally.
  • Members of any of the three can only use proxies they have been granted specific access to, so a step that needs another credential needs that grant as well as the role.
  • Members of sysadmin have access regardless, which is exactly why testing as yourself proves nothing.

Scheduling work on Express without Agent

Where the edition is Express and buying is not on the table today, the practical substitute is the operating system’s own scheduler driving sqlcmd against a script file. It is not Agent and it does not pretend to be, but for a nightly backup or an index maintenance script it does the job and costs nothing. Keep the T-SQL in a file under source control rather than inline in the task, so the thing being scheduled is reviewable.

The command a scheduled task runs. -b makes it return an error code on failure

sqlcmd -S .\SQLEXPRESS -E -b -i "C:\Scripts\nightly-backup.sql" -o "C:\Logs\nightly-backup.log"
  • Use -b so a failing batch returns a non-zero exit code, otherwise the task reports success whatever happened.
  • Redirect output to a file with -o and keep the files, because you have no job history to fall back on.
  • Run the task under an account that has the rights the script needs on the instance, not under whichever account happened to create it.
  • Have the task itself alert on failure. Nothing in SQL Server will do it for you on Express, because operators and alerts are part of Agent.

Event IDs, honestly

Event IDs 103 and 208 are widely quoted for the SQLSERVERAGENT event source in the Windows Application log – 103 for a service that could not start, 208 for a scheduled job that failed. No current Microsoft documentation publishes those event IDs, so treat them as a landmark rather than a specification: filter the Application log by the SQLSERVERAGENT source and read the message bodies, which carry the reason, rather than matching on a number nobody documents.

When a licence is the actual fix

If the edition check returned Express, this is a licensing boundary rather than a technical fault. Microsoft’s editions tables list SQL Server Agent as not supported on Express, and no component adds it. SQL Server 2025 Standard (2-core pack) includes Agent in full, along with maintenance plans, alerting and the scheduling that log shipping and replication depend on. The move is an in-place edition upgrade: your databases stay where they are and the outage is a service restart – but note Microsoft’s own caveat that an Express instance needs post-upgrade steps, because the Agent service has to be enabled and given a service account before it will run. Core licences are sold in two-core packs, so the quantity follows the cores the instance runs on, and Server plus CAL is worth comparing where the user count is small and countable. Arco supplies the key and can size it against the cores your machine presents.

Every code this article covers

Code What it points at Source
22022 What you see is SQL Server Agent’s extended procedures reporting that the service is not running, or does not exist on this edition. Microsoft’s catalogue publishes an unrelated internal message for this number, so do not look it up there not published by the vendor
14258 Cannot perform this operation while SQL Server Agent is starting; try again later. Repeated occurrences mean it is failing to start Microsoft Learn
Event ID 103 Written by the SQLSERVERAGENT source in the Windows Application log when the service could not start; read the message body, as the event ID itself is not published not published by the vendor
Event ID 208 Written by the SQLSERVERAGENT source when a scheduled job ends in failure; again, the reason is in the message body rather than the number not published by the vendor

Confirm the fix worked

  1. The Agent service shows Running in SQL Server Configuration Manager with a start mode of Automatic.
  2. EXEC sp_configure 'Agent XPs'; returns a run value of 1, with show advanced options set first.
  3. A test job runs to completion and its history appears in job history.
  4. The user who reported the problem can start their own job, not just you.
  5. Reboot the machine and confirm Agent starts on its own without intervention.

Questions people ask about this

Can I install SQL Server Agent on Express separately?

No. Microsoft’s editions tables list SQL Server Agent as not supported on Express, and there is no download, optional feature in setup or supported workaround. It is one of the capabilities that distinguishes the paid editions, in the same way the size and memory limits do.

Why does Microsoft’s error list show something else for 22022?

Because the Agent message is not a catalogued one. sys.messages has an unrelated internal message at that number, and its text even differs between releases. The Agent refusal is raised by the Agent extended stored procedures, which is why you cannot look the number up usefully.

Is Windows Task Scheduler an acceptable substitute?

For simple, single-step work such as running a backup script on a schedule, yes, and it costs nothing. It is no substitute for maintenance plans, log shipping or replication, which schedule themselves through Agent and cannot run without it.

I upgraded the edition and Agent still is not there. Why?

Because the upgrade does not start it for you. Microsoft’s edition-upgrade documentation notes that an Express instance requires post-upgrade steps: enable the SQL Server Agent service and configure its service account.

What does an edition with Agent cost?

It depends on the cores the machine or virtual machine presents, since licences are sold in two-core packs, or on your user count under Server plus CAL. Send us the core count and we will price both properly.

Related error codes

Was this article helpful?

Your feedback helps us improve our documentation.

Related articles

License Error Error 3624 Assertion Failures: When a Cumulative Update Is the Only Fix License Error Error 41131: Failed to Bring the Availability Group Online Free Fix SQL Server Error 18456: Read the State Number to Find the Real Cause Free Fix Error 233: No Process Is on the Other End of the Pipe at Login Time
โ† Back to Knowledge Base