Share via


Execute SQL Server Agent Job Task

The Execute SQL Server Agent Job task runs SQL Server Agent jobs. SQL Server Agent is a Microsoft Windows service that runs jobs that have been defined in an instance of SQL Server. You can create jobs that execute Transact-SQL statements and ActiveX scripts, perform Analysis Services and Replication maintenance tasks, or run packages. You can also configure a job to monitor Microsoft SQL Server and fire alerts. SQL Server Agent jobs are typically used to automate tasks that you perform repeatedly. For more information, see Configuring SQL Server Agent and Implementing Jobs.

By using the Execute SQL Server Agent Job task, a package can perform administrative tasks related to SQL Server components. For example, a SQL Server Agent job can run a system stored procedure such as sp_enum_dtspackages to obtain a list of packages in a folder.

Note

SQL Server Agent must be running before local or multiserver administrative jobs can run automatically.

This task encapsulates the sp_start_job system procedure and passes the name of the SQL Server Agent job to the procedure as an argument. For more information, see sp_start_job (Transact-SQL).

Configuring the Execute SQL Server Agent Job Task

You can set properties through SSIS Designer. This task is in the Maintenance Plan Tasks section of the Toolbox in SSIS Designer.

For more information about the properties that you can set in SSIS Designer, click the following topic:

For more information about how to set these properties in SSIS Designer, click the following topic:

Integration Services icon (small) Stay Up to Date with Integration Services

For the latest downloads, articles, samples, and videos from Microsoft, as well as selected solutions from the community, visit the Integration Services page on MSDN or TechNet:

For automatic notification of these updates, subscribe to the RSS feeds available on the page.