SQL Server Error while trying to delete Job: Cannot perform this operation while SQLServerAgent is starting

  • Sandro Pereira
  • Oct 29, 2024
  • 3 min read

Today, while installing a brand‑new BizTalk Server environment, the initial configuration attempt failed. As a result, I tried to clean up the artifacts created during that failed setup. During this cleanup process, specifically while removing the BizTalk Server SQL Jobs, I encountered the following error:

Drop failed for Job ‘Backup BizTalk Server (BizTalkMgmtDb)’. (Microsoft.SqlServer.Smo)
Additional information:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

Cannot perform this operation while SQLServerAgent is starting. Try again later. (Microsoft SQL Server, Error: 14258)

Cannot perform this operation while

📝 One-Minute Brief

When managing SQL Server Agent jobs, you may encounter the error “Cannot perform this operation while SQLServerAgent is starting” while trying to delete or modify a job. This post explains why this SQL Server error occurs, what it means for SQL Server Agent state, and how to resolve it safely—whether by waiting briefly, restarting services, or checking server resources during startup.

Cause

The SQL Server Error 14258, indicating “SQLServerAgent is starting,” often appears when SQL Server Agent is in a state where it can’t be started or stopped properly. Here are some possible causes:

  • This error typically appears if SQL Server Agent is stuck in a “starting” state due to a previous ungraceful shutdown.
  • Sometimes, scheduled jobs or processes may be conflicting and cause SQL Server Agent to stall.
  • If there are connectivity issues between SQL Server and SQL Server Agent, the agent may have difficulty starting.
  • High CPU or memory usage on the server can sometimes prevent SQL Server Agent from starting.

Sometimes, it is just a matter of waiting a few seconds for the SQL Server Agent to start completely.

Solution

Depending on the root cause of your problem, this can be solved in different ways:

  • Restart the SQL Server Agent service or, if it’s still unresponsive, try restarting the SQL Server service itself. You can do this through SQL Server Configuration Manager.
  • Check the system resources and make sure there is enough memory and CPU availability for SQL Server and SQL Server Agent.
  • SQL Server Agent needs appropriate permissions to start. If the account running the agent doesn’t have the necessary privileges, it may fail to start correctly.

In my case, it was simple; I just had to wait a few seconds and try again.

I hope you find this helpful! If you liked the content or found it useful and want to help me write more, you can buy (or help me buy) my son a Star Wars Lego! 

Buy me a coffee
Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

Leave a Reply

Your email address will not be published. Required fields are marked *

The Ultimate Cloud
Management Platform for Azure

Supercharge your Azure Cost Saving

Learn More
Turbo360 Widget

Back to Top