Monday 3 November 2008

SQL 2005 Agent Error FIX: UpdateUptimeRegKey: Operating system error 5(Access is denied.) encountered.

Occasionally you may see an error like this and be unable to start the SQL Agent (typically after someone doesn't use the SQL Config GUI to change service accounts)
UpdateUptimeRegKey: Operating system error 5(Access is denied.) encountered.

This is easily fixed.

Fire up regedit, navigate to HKLM\Software\Microsoft\Microsoft SQL Server\[YOUR INSTANCE NUMBER] then right-click and select "Permissions..."
Ensure that the SQLAgent Service and SQL Server Service have full control here and you should be all set. Be sure to use the local groups that SQL 2005 creates for this sort of access delegation to avoid having to do this again when you change service accounts. Note that you wouldn't want to use those groups (and instead use just the service account) if you're locking the permissions down to a point that you want to make it very difficult for an OS admin to get access to your SQL instance.

Cheers!

1 comment:

cialis said...

Hello, I do not agree with the previous commentator - not so simple