Remove Steps from a SQL Server Agent Master Job
Applies to: SQL Server
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 remove steps from a SQL Server Agent master job in SQL Server by using SQL Server Management Studio or Transact-SQL.
Before You Begin
Limitations and Restrictions
A SQL Server Agent master job cannot be targeted at both local and remote servers.
Security
Permissions
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.
Using SQL Server Management Studio
To remove steps from a SQL Server Agent master job
In Object Explorer, click the plus sign to expand the server that contains the job where you want to delete steps.
Click the plus sign to expand SQL Server Agent.
Click the plus sign to expand the Jobs folder.
Right-click the job where you want to delete steps and select Properties.
In the Job Properties -job_name dialog box, under Select a page, select Steps.
Under Job step list, select the job step you want to delete and click Delete.
When finished, click OK.
Using Transact-SQL
To remove steps from a SQL Server Agent master job
In Object Explorer, connect to an instance of Database Engine.
On the Standard bar, click New Query.
Copy and paste the following example into the query window and click Execute.
-- removes job step 1 from the job Weekly Sales Data Backup USE msdb ; GO EXEC dbo.sp_delete_jobstep @job_name = N'Weekly Sales Data Backup', @step_id = 1 ; GO
For more information, see sp_delete_jobstep (Transact-SQL).
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for