Today, while installing a brand new BizTalk Server environment and after the first attempt to configure BizTalk Server failed, I encountered this error while trying to clean up the artifacts created by the failed configuration of BizTalk Server, in this particular case, the BizTalk Server SQL Jobs:
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)
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 causing 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!