Error while executing a sql job “The EXECUTE permission was denied on the object ‘sp_start_job’,database ‘msdb’,schema’dbo’.
SOLUTION:
1) Go to MSDB– Security –Users — UserName — User Name Properties — Assigned the ‘TargetServerRole’ in msdb
2) Run the query
select pr.name, dp.permission_name, dp.state_desc
from msdb.sys.database_permissions dp
join msdb.sys.objects o on dp.major_id = o.object_id
join msdb.sys.database_principals pr
on dp.grantee_principal_id = pr.principal_id
where o.name = ‘sp_start_job’
3) Grant Execute permission to concern user to SP_Start_Job and SP_Stop_Job and it resolved the issue.
No comments:
Post a Comment