Düzenle

Aracılığıyla paylaş


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

Applies to: Azure SQL Database

Contains jobs configurations in the Azure Elastic Jobs service for Azure SQL Database.

Column name Data type Description
job_name nvarchar(128) Name of the job.
job_id uniqueidentifier Unique ID of the job.
job_version int Version of the job (automatically updated each time the job is modified).
description nvarchar(512) Description for the job.
enabled bit Indicates whether the job is enabled or disabled. 1 indicates enabled jobs, and 0 indicates disabled jobs.
schedule_interval_type nvarchar(50) Value indicating when the job is to be executed:

- Once
- Minutes
- Hours
- Days
- Weeks
- Months
schedule_interval_count int Number of schedule_interval_type periods to occur between each execution of the job.
schedule_start_time datetime2(7) Date and time the job was last started execution.
schedule_end_time datetime2(7) Date and time the job was last completed execution.

Permissions

Members of the jobs_reader role can SELECT from this view. For more information, see Elastic jobs in Azure SQL Database.

Caution

You should not update internal catalog views in the job database. Manually changing these catalog views can corrupt the job database and cause failure. These views are for read-only querying only. You can use the stored procedures on your job database.

Remarks

All times in elastic jobs are in the UTC time zone.

Examples

View all enabled jobs in an elastic job agent

This sample retrieves only enabled jobs in the job agent. Connect to the job database specified when creating the job agent to run this sample.

--Connect to the job database specified when creating the job agent

-- View all enabled jobs
SELECT * FROM [jobs].[jobs]
WHERE [enabled] = 1;