Resurrect SQL Server Agent after repair an instance

For Spanish version visit this link Resucitar Agente SQL Server después de reparar una instancia
 
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.
 
 
 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.
 
 
 
 
 
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.
 
 
 
 
 
 
 
Once done, I went to Failover Cluster Manager and the Agent resource started without problem
 
 

About Fran Lens
SQL Server Analyst at Avanade Spain http://www.lensql.net

2 Responses to Resurrect SQL Server Agent after repair an instance

  1. Pingback: Resucitar Agente SQL Server después de reparar una instancia « LenSQL

  2. Max Power says:

    Fran, thank you so much for this writeup and the accompanying screencaps. I was having this problem after upgrading to R2SP2 (from 2008 RTM) and had already spent a couple of hours troubleshooting before finding your blog and fixing it. I didn’t even think to look at the location of the Agent executable. Again, thank you so much. You saved me from a sleepless night.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: