I'm trying to find or devise a way to allow a team of developers to be able to amend SQL Agent Job steps and schedules, but that doesn't involve Sysadmin rights for the devs. As I can't assign ownership of Agent jobs to a Group I need some sort of workaround.
So far I've come up with the following ideas
- Create a Login to the server and a matching User in MSDB and Master. Use this account to own Agent Jobs. To allow amendments, GRANT EXECUTE ON [msdb].[dbo].sp_update_job, sp_update_jobstep and sp_update_jobschedule to a group containing the developers.
This allows them to submit amendments to any Agent Job by using the MSDB stored procedures
- Create a Login / User as above, and make it owner of all the Agent Jobs. Then share the password with the developers.
Neither of these two scenarios are particularly secure for different reasons, but I'm trying to balance the needs of the security team versus the developers ability to perform their jobs - so a little pragmatism needs to be involved I think.
Are there any better ways to achieve this?