By default, members of the sysadmin fixed server role can execute this stored procedure. Other users must be granted one of the following SQL Server Agent fixed database roles in the msdb database:
- SQLAgentUserRole
- SQLAgentReaderRole
- SQLAgentOperatorRoleFor details about the permissions of these roles, see SQL Server Agent Fixed Database Roles.Only members of sysadmin can modify a schedule owned by another user.
/** But even the login with all the above permission and also being a job owner cannot modify the job schedule as he will get the below error**/
Solution: Need to grant the particular owner login with schedule update permission with the below query.
USE msdb ;
GO
EXEC dbo.sp_update_schedule
@name = 'JOBNAME',
@enabled = 0,
@owner_login_name = 'LoginName' ;
GO
No comments:
Post a Comment