Thursday, July 10, 2008

Developer Permissions on SQL Agent Jobs

I wanted to grant developers permission to see SQL Agent jobs, but not to mess with them...

USE msdb;
GO
EXECUTE sp_addrolemember @rolename = 'role', @membername = 'username'
GO

Where role is -

SQLAgentReaderRole - allows users to see all jobs
SQLAgentUserRole - allows users to create jobs and to manage the jobs that they create.
SQLAgentOperatorRole - allows users all of the rights assigned to the SQLAgentReaderRole along with the permissions necessary to execute local jobs that they do not own.

No comments: