Sql-server – Is it safe to restart Sql Server Agent

sql serversql-server-2005

I've found myself in the tenuous role of a developer tasked to manage a SQL server. I've set up some jobs to run on a schedule, but would like to receive email notification on completion.

I've set up Database Mail and successfully sent a test message but I receive an error saying that an attempt was made to send mail when no session was established. In researching this there is a lot of noise that restarting the SQL Server Agent will fix the problem.

But before I go too far down the rabbit hole, I thought I'd ask if there are any unintended consequences of restarting the SQL Server Agent? For example, will it affect any current jobs, or is there a high risk that it will shut down but won't restart?

This is SQL 2005 x64 SP4.

Best Answer

The agent only tends to deal with running maintenance jobs (backups, re-indexing etc). Check there will be nothing running when before you restart it and you should be ok. I've never not had it restart before, but like anything else it i'd do it out of hours if your worried.

Related Topic