The job failed. Unable to determine if the owner (sa) of job has server access.

If you have failing SQL Agent jobs with the following error;

The job failed.  Unable to determine if the owner (sa) of job  has server access.

and the following is logged in the SQL Server Log;

Message
[298] SQLServer Error: 15281, SQL Server blocked access to procedure 'dbo.sp_sqlagent_has_server_access' of component 'Agent XPs' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Agent XPs' by using sp_configure. For more information about enabling 'Agent XPs', see "Surface Area Configuration" in SQL Server Books Online. [SQLSTATE 42000] (ConnIsLoginSysAdmin)

This should fix it for you;

EXEC sp_configure 'Agent XPs', 1;
RECONFIGURE;

Leave a Reply