Because SQL Server Agent does not cache the job until sp_add_jobserver is called, it is more efficient to call sp_add_jobserver last. Therefore, any modifications implicitly force SQL Server Agent to re-cache the job. Local jobs are cached by the local SQL Server Agent. For more information about the SQL Server Agent fixed database roles, see SQL Server Agent Fixed Database Roles.Īssigning a job to another login does not guarantee that the new owner has sufficient permission to run the job successfully. A job can be edited only by its owner or members of the sysadmin role. To create a job, a user must be a member of one of the SQL Server Agent fixed database roles or the sysadmin fixed server role. To add job steps, schedules, alerts, and notifications that can be sent to operators, see the links to topics in the See Also section.īefore You Begin Limitations and Restrictions
#SQL SERVER AGENT HOW TO#
This topic describes how to create a SQL Server Agent job in SQL Server by using SQL Server Management Studio, Transact-SQL, or SQL Server Management Objects (SMO). See Azure SQL Managed Instance T-SQL differences from SQL Server for details.
On Azure SQL Managed Instance, most, but not all SQL Server Agent features are currently supported.