the user gets this error when running the following statement:
select j.name as 'JobName',
msdb.dbo.agent_datetime(run_date, run_time) as 'RunDateTime',
from msdb.dbo.sysjobs j
inner join msdb.dbo.sysjobhistory h
on j.job_id = h.job_id
where j.enabled = 1
order by JobName, RunDateTime desc
To resolve this issue created a DB_executor role on msdb database and gave permission to the user to execute. That did not resolve the issue.
Also did this go to security->schema->dbo.. Double click dbo... then click on permission tab->(blue font)view database permission and feel free to scroll for required fields like "execute"....help yourself with choosing....and grant,with grant .... not sure if this resolve the issue. Any advices.