Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to:
SQL Server
Azure SQL Managed Instance
Important
On Azure SQL Managed Instance, most, but not all SQL Server Agent features are currently supported. See Azure SQL Managed Instance T-SQL differences from SQL Server or SQL Agent job limitations in SQL Managed Instance for details.
This article describes how to configure a user to create or execute SQL Server Agent jobs.
Security
To configure a user to create or execute SQL Server Agent jobs, you must first add an existing SQL Server login or msdb
role to one of the following SQL Server Agent fixed database roles in the msdb
database:
- SQLAgentUserRole
- SQLAgentReaderRole
- SQLAgentOperatorRole
By default, members of these database roles can create their own job steps that run as themselves. If these non-administrative users want to run jobs that execute other job step types (for example, SSIS packages), they must have access to a proxy account. All members of the sysadmin fixed server role have permission to create, modify, and delete proxy accounts. For more information about the permissions that are associated with these SQL Server Agent fixed database roles, see SQL Server Agent fixed database roles.
Permissions
For detailed information, see Implement SQL Server Agent security.
Use SQL Server Management Studio
Add a SQL login or msdb role to a SQL Server Agent fixed database role
In Object Explorer, expand a server.
Expand Security, and then expand Logins.
Right-click the login you wish to add to a SQL Server Agent fixed database role, and select Properties.
On the User Mapping page of the Login Properties dialog box, select the row containing
msdb
.Under Database role membership for: msdb, check the appropriate SQL Server Agent fixed database role.
Configure a proxy account to create and manage SQL Server Agent job steps
In Object Explorer, expand a server.
Expand SQL Server Agent.
Right-click Proxies and select New Proxy.
On the General page of the New Proxy Account dialog, specify the proxy name, credential name, and description for the new proxy. You must create a credential first before creating a SQL Server Agent proxy. For more information about creating a credential, see Create a Credential and CREATE CREDENTIAL.
Check the appropriate subsystems for this proxy.
On the Principals page, add or remove logins or roles to grant or remove access to the proxy account.