Редагувати

Поділитися через


jobs.sp_start_job (Azure Elastic Jobs) (Transact-SQL)

Applies to: Azure SQL Database

Starts an existing job in the Azure Elastic Jobs service for Azure SQL Database.

This stored procedure shares the name of sp_start_job with a similar object in SQL Server for the SQL Server Agent service. For information about the SQL Server Agent version, see sp_start_job.

Transact-SQL syntax conventions

Syntax

[jobs].sp_start_job [ @job_name = ] 'job_name'
     [ , [ @job_execution_id = ] job_execution_id OUTPUT ]

Arguments

@job_name

The name of the job to start. job_name is nvarchar(128), with no default.

@job_execution_id

Output parameter that will be assigned the job execution's ID. job_version is uniqueidentifier.

Return code values

0 (success) or 1 (failure).

Permissions

By default, members of the sysadmin fixed server role can execute this stored procedure. Only members of sysadmin can use this stored procedure to edit the attributes of jobs that are owned by other users.