Start a Job
This topic describes how to start running a Microsoft SQL Server Agent job in SQL Server 2016 by using SQL Server Management Studio, Transact-SQL or SQL Server Management Objects.
A job is a specified series of actions that SQL Server Agent performs. SQL Server Agent jobs can run on one local server or on multiple remote servers.
Before you begin:
To start a job, using:
For detailed information, see Implement SQL Server Agent Security.
In Object Explorer, connect to an instance of the SQL Server Database Engine, and then expand that instance.
Expand SQL Server Agent, and expand Jobs. Depending on how you want the job to start, do one of the following:
If you are working on a single server, or working on a target server, or running a local server job on a master server, right-click the job you want to start, and then click Start Job.
If you want to start multiple jobs, right-click Job Activity Monitor, and then click View Job Activity. In the Job Activity Monitor you can select multiple jobs, right-click your selection, and click Start Jobs.
If you are working on a master server and want all targeted servers to run the job simultaneously, right-click the job you want to start, click Start Job, and then click Start on all targeted servers.
If you are working on a master server and want to specify target servers for the job, right-click the job you want to start, click Start Job, and then click Start on specific target servers. In the Post Download Instructions dialog box, select the These target servers check box, and then select each target server on which this job should run.
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.
-- starts a job named Weekly Sales Data Backup. USE msdb ; GO EXEC dbo.sp_start_job N'Weekly Sales Data Backup' ; GO
For more information, see sp_start_job (Transact-SQL).
To start a job
Call the Start method of the Job class by using a programming language that you choose, such as Visual Basic, Visual C#, or PowerShell. For more information, see SQL Server Management Objects (SMO).