title | description | author | ms.author | ms.date | ms.service | ms.subservice | ms.topic | monikerRange |
---|---|---|---|---|---|---|---|---|
Change the Scheduling Details for a Master Job |
Change the Scheduling Details for a SQL Server Agent Master Job |
markingmyname |
maghan |
01/19/2017 |
sql |
ssms |
how-to |
= azuresqldb-mi-current || >= sql-server-2016 |
[!INCLUDE SQL Server SQL MI]
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 for details.
This topic describes how to change the scheduling details for a job definition in [!INCLUDEssnoversion] by using SQL Server Management Studio or [!INCLUDEtsql].
A [!INCLUDEssNoVersion] Agent master job cannot be targeted at both local and remote servers.
Warning
It is possible to attach multiple jobs to the same schedule. Note that updating a schedule will impact all the jobs attached to the schedule.
Unless you are a member of the sysadmin fixed server role, you can only modify jobs that you own. For detailed information, see Implement SQL Server Agent Security.
-
In Object Explorer, click the plus sign to expand the server that contains the job whose schedule you want to edit.
-
Click the plus sign to expand SQL Server Agent.
-
Click the plus sign to expand the Jobs folder.
-
Right-click the job whose schedule you want to edit and select Properties.
-
In the Job Properties -job_name dialog box, under Select a page, select Schedules. For more information on the available options on this page, see Job Properties - New Job (Schedules Page).
-
When finished, click OK.
-
In Object Explorer, connect to an instance of [!INCLUDEssDE].
-
On the Standard bar, click New Query.
-
Copy and paste the following example into the query window and click Execute.
-- changes the enabled status of the NightlyJobs schedule to 0 -- and sets the owner to terrid. USE msdb ; GO EXEC dbo.sp_update_schedule @name = 'NightlyJobs', @enabled = 0, @owner_login_name = 'terrid' ; GO
For more information, see sp_update_schedule (Transact-SQL).