To resolve this issue, manually add the SQL Server Agent service account or the SQL Server Agent service security principal (SID) to the sysadmin server role. The SQL Server Agent service must have the service account or the service security principal added to the sysadmin server role to function correctly. To do this, follow these steps, depending on the operating system.
Windows Server 2003 and Windows XP
- Click Start, point to All Programs, point to Microsoft SQL Server 2008, and then click SQL Server Management Studio.
- In the Connect to Server dialog box, verify the default settings, and then click Connect.
- In Object Explorer, right-click the server, and then click New Query to open a new Database Engine Query Editor window.
- In the Query Editor window, type the following Transact-SQL statement:
EXEC sp_addsrvrolemember '<Domain>\<Account>', 'sysadmin';
GO
Note <Domain> represents the domain name, and <Account> represents the domain user account that is assigned to the SQL Server 2008 Agent service. - Press F5 to execute the query.
- Close the SQL Server Management Studio window.
- Try to restart the SQL Server Agent service.
Windows Server 2008 and Windows Vista
For all nonclustered and clustered instances of SQL Server 2008 for which the service SID option is selected, add the SQL Server Agent service security principal to the sysadmin server role if it is not already added to the sysadmin server role.
The name of the service security principal that corresponds to the SID has the following format:
NT SERVICE\ServiceName
For example, "NT SERVICE\SQLServerAgent" represents the service principal name for the SQL Server Agent service.
The Windows user interface does not list service security principals for all the services. Therefore, you may have to manually type the name of the service security principal. To add the SQL Server Agent service to the sysadmin manually, follow these steps:
- Click Start, point to All Programs, point to Microsoft SQL Server 2008, and then click SQL Server Management Studio.
- In the Connect to Server dialog box, verify the default settings, and then click Connect.
- In Object Explorer, right-click the server, and then click New Query to open a new Database Engine Query Editor window.
- In the Query Editor window, type the following Transact-SQL statement:
EXEC sp_addsrvrolemember 'NT SERVICE\<ServiceName>', 'sysadmin';
GO
Note You must replace <ServiceName> with SQLServerAgent for the default instance or SQLAgent$InstanceName for a named instance.
- Press F5 to execute the query.
- Close the SQL Server Management Studio window.
- Try to start the SQL Server Agent service.
For clustered instances of SQL Server 2008 on Windows Server 2008 for which the service SID option is not selected during installation, follow the steps in the "Windows Server 2003 and Windows XP" section to add the SQL Server Agent service account.