Skip to main content

job_executions

Creates, updates, deletes, gets or lists a job_executions resource.

Overview

Namejob_executions
TypeResource
Idazure.sql.job_executions

Fields

NameDatatypeDescription
create_timetextfield from the properties object
current_attempt_start_timetextfield from the properties object
current_attemptstextfield from the properties object
end_timetextfield from the properties object
jobAgentNametextfield from the properties object
jobExecutionIdtextfield from the properties object
jobNametextfield from the properties object
job_execution_idtextfield from the properties object
job_versiontextfield from the properties object
last_messagetextfield from the properties object
lifecycletextfield from the properties object
provisioning_statetextfield from the properties object
resourceGroupNametextfield from the properties object
serverNametextfield from the properties object
start_timetextfield from the properties object
step_idtextfield from the properties object
step_nametextfield from the properties object
subscriptionIdtextfield from the properties object
targettextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTjobAgentName, jobExecutionId, jobName, resourceGroupName, serverName, subscriptionIdGets a job execution.
list_by_agentSELECTjobAgentName, resourceGroupName, serverName, subscriptionIdLists all executions in a job agent.
list_by_jobSELECTjobAgentName, jobName, resourceGroupName, serverName, subscriptionIdLists a job's executions.
createINSERTjobAgentName, jobName, resourceGroupName, serverName, subscriptionIdStarts an elastic job execution.
create_or_updateINSERTjobAgentName, jobExecutionId, jobName, resourceGroupName, serverName, subscriptionIdCreates or updates a job execution.
cancelEXECjobAgentName, jobExecutionId, jobName, resourceGroupName, serverName, subscriptionIdRequests cancellation of a job execution.

SELECT examples

Lists all executions in a job agent.

SELECT
create_time,
current_attempt_start_time,
current_attempts,
end_time,
jobAgentName,
jobExecutionId,
jobName,
job_execution_id,
job_version,
last_message,
lifecycle,
provisioning_state,
resourceGroupName,
serverName,
start_time,
step_id,
step_name,
subscriptionId,
target
FROM azure.sql.vw_job_executions
WHERE jobAgentName = '{{ jobAgentName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new job_executions resource.

/*+ create */
INSERT INTO azure.sql.job_executions (
jobAgentName,
jobName,
resourceGroupName,
serverName,
subscriptionId
)
SELECT
'{{ jobAgentName }}',
'{{ jobName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}'
;