Resurrect SQL Server Agent after repair an instance
After a failed update from SQL Server 2005 to SQL Server 2008 R2 SP1, I decided to use the Repair option of the installer, the SQL Server resource was repaired correctly, but the SQL Server Agent couldn’t start.
![](https://aleson-itc.com/wp-content/uploads/2012/05/1agente.jpg)
The Agent service didn’t appear in the SQL Server Configuration Manager, and reviewing the Agent Log I found nothing, so I decided to look the SQL Server Agent Windows service, when I try to start them, it shows the error “Error 2: The system cannot find the file specified”, looking at their properties I found that the path that it was pointing was wrong, because it point to the SQLAGENT.EXE of SQL Server 2005 version, and the instace was already migrated to 2008R2.
![](https://aleson-itc.com/wp-content/uploads/2012/05/2agente.jpg)
![](https://aleson-itc.com/wp-content/uploads/2012/05/3agente.jpg)
![](https://aleson-itc.com/wp-content/uploads/2012/05/4agente.jpg)
![](https://aleson-itc.com/wp-content/uploads/2012/05/5agente.jpg)
To fix this, I did a search in the Registry Editor and found the incorrect data in HKLM/SYSTEM/ControlSet001/services/SQLAgent$INSTANCE in the ImagePath record, only had to edit it and write the correct path.
![](https://aleson-itc.com/wp-content/uploads/2012/05/6agente.jpg)
![](https://aleson-itc.com/wp-content/uploads/2012/05/7agente.jpg)
![](https://aleson-itc.com/wp-content/uploads/2012/05/7bagente.jpg)
![](https://aleson-itc.com/wp-content/uploads/2012/05/8agente.jpg)
![](https://aleson-itc.com/wp-content/uploads/2012/05/9agente.jpg)
![](https://aleson-itc.com/wp-content/uploads/2012/05/10agente.jpg)
Once done, I went to Failover Cluster Manager and the Agent resource started without problem
![](https://aleson-itc.com/wp-content/uploads/2012/05/11agente.jpg)
![](https://aleson-itc.com/wp-content/uploads/2024/04/DSC08759-2_Cuadrada_Mini.jpg)
Consultor Senior SQL Server & BI con 9 años de experiencia, MCSE Data Platform con conocimientos de toda la herramienta y enfocado principalmente a la detección y mejora de problemas de rendimiento en Base de Datos. En mi tiempo libre soy un gran aficionado a la fotografía de estilo urbano y de lugares abandonados.