Skip to content

Commit a816ba3

Browse files
authored
Merge pull request #27999 from WilliamDAssafMSFT/20230802-elastic-jobs-preview-refresh
READY elastic jobs preview refresh
2 parents 9eada9a + bdb4223 commit a816ba3

File tree

62 files changed

+7324
-1633
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+7324
-1633
lines changed

azure-sql/database/doc-changes-updates-release-notes-whats-new.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn about the new features and documentation improvements for Azu
55
author: WilliamDAssafMSFT
66
ms.author: wiassaf
77
ms.reviewer: mathoma, randolphwest
8-
ms.date: 10/30/2023
8+
ms.date: 11/06/2023
99
ms.service: sql-database
1010
ms.subservice: service-overview
1111
ms.topic: whats-new
@@ -40,7 +40,7 @@ The following table lists the features of Azure SQL Database that are currently
4040
| [Azure SQL triggers for Azure Functions](/azure/azure-functions/functions-bindings-azure-sql-trigger) | Azure Functions supports function triggers for the Azure SQL and SQL Server products. |
4141
| [DC-series hardware up to 40 vCores](resource-limits-vcore-single-databases.md) | DC-series hardware from 10 to 40 vCores is now in preview for in General Purpose, Business Critical, and Hyperscale provisioned compute. |
4242
| [Degrees of Parallelism (DOP) feedback](/sql/relational-databases/performance/intelligent-query-processing-feedback#degree-of-parallelism-dop-feedback) | DOP Feedback is currently available as a limited preview. For more information and how to apply for the preview, see [Announcing Degree of Parallelism Feedback Limited Preview](https://techcommunity.microsoft.com/t5/azure-sql-blog/announcing-degree-of-parallelism-feedback-limited-preview/ba-p/3806924). |
43-
| [Elastic jobs](elastic-jobs-overview.md) | The elastic jobs feature is the SQL Server Agent replacement for Azure SQL Database as a PaaS offering. |
43+
| [Elastic jobs](elastic-jobs-overview.md) | Updated with a preview refresh and new capabilities in November 2023, elastic jobs are the SQL Server Agent replacement for Azure SQL Database. Elastic jobs now support Microsoft Entra (formerly Azure Active Directory) authentication, Azure Private links, management via REST APIs, Azure Alerts, and new capabilities and user interface in the Azure portal. Job Agents now provide four capacity tiers to scale concurrency for job execution. |
4444
| [Elastic queries](elastic-query-overview.md) | The elastic queries feature allows for cross-database queries in Azure SQL Database. |
4545
| [Elastic transactions](elastic-transactions-overview.md) | Elastic transactions allow you to execute transactions distributed among cloud databases in Azure SQL Database. |
4646
| [Free Azure SQL Database](free-offer.md) | Try Azure SQL Database for free, for the life of your subscription. This free offer provides a General Purpose database with 100,000 vCore seconds of compute every month. |
@@ -84,6 +84,13 @@ The following table lists the new generally available (GA) features of Azure SQL
8484

8585
Learn about significant changes to the Azure SQL Database documentation. For previous years, see the [What's new archive](doc-changes-updates-release-notes-whats-new-archive.md).
8686

87+
### November 2023
88+
89+
| Changes | Details |
90+
| --- | --- |
91+
| **Elastic jobs (preview)** | The [elastic jobs](elastic-jobs-overview.md) feature is the SQL Server Agent replacement for Azure SQL Database. New features and documentation enhancements have been added in a preview refresh in November 2023. Elastic jobs now support Microsoft Entra (formerly Azure Active Directory) authentication, Private links, management via REST APIs, Azure Alerts, and new capabilities and user interface in the Azure portal. Job Agents now provide four capacity tiers to scale concurrency for job execution. |
92+
93+
8794
### October 2023
8895

8996
| Changes | Details |

azure-sql/database/elastic-jobs-overview.md

Lines changed: 273 additions & 57 deletions
Large diffs are not rendered by default.

azure-sql/database/elastic-jobs-powershell-create.md

Lines changed: 151 additions & 90 deletions
Large diffs are not rendered by default.

azure-sql/database/elastic-jobs-tsql-create-manage.md

Lines changed: 227 additions & 1030 deletions
Large diffs are not rendered by default.

azure-sql/database/elastic-jobs-tutorial.md

Lines changed: 207 additions & 0 deletions
Large diffs are not rendered by default.

azure-sql/database/job-automation-overview.md

Lines changed: 21 additions & 156 deletions
Large diffs are not rendered by default.
Binary file not shown.

azure-sql/database/media/elastic-jobs-overview/private-endpoints.svg

Lines changed: 2275 additions & 0 deletions
Loading

azure-sql/database/media/elastic-jobs-overview/umi-jobuser.svg

Lines changed: 1762 additions & 0 deletions
Loading
Binary file not shown.
Loading

azure-sql/toc.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -719,10 +719,12 @@
719719
href: database/block-geo-redundant-backup-storage.md
720720
- name: Elastic jobs (preview)
721721
items:
722-
- name: Job automation with elastic jobs
722+
- name: Job automation overview
723723
href: database/job-automation-overview.md
724-
- name: Configure jobs
724+
- name: Elastic jobs in Azure SQL Database
725725
href: database/elastic-jobs-overview.md
726+
- name: Elastic jobs tutorial
727+
href: database/elastic-jobs-tutorial.md
726728
- name: Create and manage (PowerShell)
727729
href: database/elastic-jobs-powershell-create.md
728730
- name: Create and manage (T-SQL)
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
---
2+
title: "jobs.job_executions (Azure Elastic Jobs) (Transact-SQL)"
3+
description: "The jobs.job_executions system view contains information about Azure Elastic job execution history."
4+
author: WilliamDAssafMSFT
5+
ms.author: wiassaf
6+
ms.date: 11/03/2023
7+
ms.service: sql-database
8+
ms.subservice: system-objects
9+
ms.topic: "reference"
10+
f1_keywords:
11+
- "JOBS.JOB_EXECUTIONS"
12+
- "JOB_EXECUTIONS"
13+
helpviewer_keywords:
14+
- "job_executions catalog view"
15+
- "jobs.job_executions catalog view"
16+
dev_langs:
17+
- "TSQL"
18+
monikerRange: "=azuresqldb-current"
19+
---
20+
# jobs.job_executions (Azure Elastic Jobs) (Transact-SQL)
21+
22+
[!INCLUDE [Azure SQL Database](../../includes/applies-to-version/asdb.md)]
23+
24+
Contains job execution status and history for jobs in the [Azure Elastic Jobs service for Azure SQL Database](/azure/azure-sql/database/elastic-jobs-overview?view=azuresql-db&preserve-view=true).
25+
26+
|Column name | Data type | Description |
27+
|---------|---------|---------|
28+
|**job_execution_id** | uniqueidentifier | Unique ID of an instance of a job execution.
29+
|**job_name** | nvarchar(128) | Name of the job.
30+
|**job_id** | uniqueidentifier | Unique ID of the job.
31+
|**job_version** | int | Version of the job (automatically updated each time the job is modified).
32+
|**step_id** |int | Unique (for this job) identifier for the step. `NULL` indicates this execution is the parent job execution.
33+
|**is_active** | bit | Indicates whether information is active or inactive. `1` indicates active jobs, and `0` indicates inactive.
34+
|**lifecycle** | nvarchar(50) | Value indicating the status of the job. See [Lifecycle](#lifecycle) table for possible values. |
35+
|**create_time**| datetime2(7) | Date and time the job was created.
36+
|**start_time** | datetime2(7) | Date and time the job started execution. `NULL` if the job has not yet been executed.
37+
|**end_time** | datetime2(7) | Date and time the job finished execution. `NULL` if the job has not yet been executed or has not yet completed execution.
38+
|**current_attempts** | int | Number of times the step was retried. Parent job is `0`, child job executions will be `1` or greater, based on the execution policy.
39+
|**current_attempt_start_time** | datetime2(7) | Date and time the job started execution. `NULL` indicates this execution is the parent job execution.
40+
|**next_attempt_start_time** | datetime2(7) | Date and time the job will start next execution. `NULL` indicates this execution is the parent job execution.
41+
|**last_message** | nvarchar(max) | Job or step history message.
42+
|**target_type** | nvarchar(128) | Type of target database or collection of databases including all databases in a server, all databases in an elastic pool or a database. Valid values for `target_type` are `SqlServer`, `SqlElasticPool`, or `SqlDatabase`. `NULL` indicates this execution is the parent job execution.
43+
|**target_id** | uniqueidentifier | Unique ID of the target group member. `NULL` indicates this execution is the parent job execution.
44+
|**target_group_name** | nvarchar(128) | Name of the target group. `NULL` indicates this execution is the parent job execution.
45+
|**target_server_name** | nvarchar(256) | Name of the server contained in the target group. Specified only if `target_type` is `SqlServer`. `NULL` indicates this execution is the parent job execution.
46+
|**target_database_name** | nvarchar(128) | Name of the database contained in the target group. Specified only when `target_type` is `SqlDatabase`. `NULL` indicates this execution is the parent job execution.
47+
48+
<a id="lifecycle"></a>
49+
50+
The following table lists the possible job execution states in `lifecycle`:
51+
52+
|State|Description|
53+
|:---|:---|
54+
|**Created** | The job execution was just created and is not yet in progress.|
55+
|**InProgress** | The job execution is currently in progress.|
56+
|**WaitingForRetry** | The job execution wasn't able to complete its action and is waiting to retry.|
57+
|**Succeeded** | The job execution has completed successfully.|
58+
|**SucceededWithSkipped** | The job execution has completed successfully, but some of its children were skipped.|
59+
|**Failed** | The job execution has failed and exhausted its retries.|
60+
|**TimedOut** | The job execution has timed out.|
61+
|**Canceled** | The job execution was canceled.|
62+
|**Skipped** | The job execution was skipped because another execution of the same job step was already running on the same target.|
63+
|**WaitingForChildJobExecutions** | The job execution is waiting for its child executions to complete.|
64+
65+
## Permissions
66+
67+
Members of the *jobs_reader* role can SELECT from this view. For more information, see [Elastic jobs in Azure SQL Database (preview)](/azure/azure-sql/database/elastic-jobs-overview?view=azuresql-db&preserve-view=true#elastic-job-database-permissions).
68+
69+
## Remarks
70+
71+
All times in elastic jobs are in the UTC time zone.
72+
73+
## Examples
74+
75+
76+
### Monitor job execution status
77+
78+
The following example shows how to view execution status details for all jobs.
79+
80+
Connect to the `job_database` and run the following command:
81+
82+
```sql
83+
--Connect to the job database specified when creating the job agent
84+
85+
--View top-level execution status for the job named 'ResultsPoolJob'
86+
SELECT * FROM jobs.job_executions
87+
WHERE job_name = 'ResultsPoolsJob' and step_id IS NULL
88+
ORDER BY start_time DESC;
89+
90+
--View all top-level execution status for all jobs
91+
SELECT * FROM jobs.job_executions WHERE step_id IS NULL
92+
ORDER BY start_time DESC;
93+
94+
--View all execution statuses for job named 'ResultsPoolsJob'
95+
SELECT * FROM jobs.job_executions
96+
WHERE job_name = 'ResultsPoolsJob'
97+
ORDER BY start_time DESC;
98+
99+
-- View all active executions
100+
SELECT * FROM jobs.job_executions
101+
WHERE is_active = 1
102+
ORDER BY start_time DESC;
103+
```
104+
105+
### Run a job and monitor status
106+
107+
The following example shows how to start an elastic job immediately as a manual, unplanned action.
108+
109+
Connect to the `job_database` and run the following command:
110+
111+
```sql
112+
--Connect to the job database specified when creating the job agent
113+
114+
-- Execute the latest version of a job and receive the execution id
115+
DECLARE @je uniqueidentifier;
116+
EXEC jobs.sp_start_job 'CreateTableTest', @job_execution_id = @je output;
117+
SELECT @je;
118+
119+
-- Monitor progress
120+
121+
SELECT * FROM jobs.job_executions WHERE job_execution_id = @je;
122+
```
123+
124+
## Related content
125+
126+
- [Elastic jobs in Azure SQL Database (preview)](/azure/azure-sql/database/elastic-jobs-overview?view=azuresql-db&preserve-view=true)
127+
- [Create, configure, and manage elastic jobs (preview)](/azure/azure-sql/database/elastic-jobs-tutorial?view=azuresql-db&preserve-view=true)
128+
- [Create and manage elastic jobs by using T-SQL (preview)](/azure/azure-sql/database/elastic-jobs-tsql-create-manage?view=azuresql-db&preserve-view=true)
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: "jobs.job_versions (Azure Elastic Jobs) (Transact-SQL)"
3+
description: "The jobs.job_versions system view contains job version history in Azure Elastic jobs."
4+
author: WilliamDAssafMSFT
5+
ms.author: wiassaf
6+
ms.date: 10/30/2023
7+
ms.service: sql-database
8+
ms.subservice: system-objects
9+
ms.topic: "reference"
10+
f1_keywords:
11+
- "jobs.job_versions"
12+
- "job_versions"
13+
helpviewer_keywords:
14+
- "job_versions catalog view"
15+
- "jobs.job_versions catalog view"
16+
dev_langs:
17+
- "TSQL"
18+
monikerRange: "=azuresqldb-current"
19+
---
20+
# jobs.job_versions (Azure Elastic Jobs) (Transact-SQL)
21+
22+
[!INCLUDE [Azure SQL Database](../../includes/applies-to-version/asdb.md)]
23+
24+
Contains version history about jobs in the [Azure Elastic Jobs service for Azure SQL Database](/azure/azure-sql/database/elastic-jobs-overview?view=azuresql-db&preserve-view=true).
25+
26+
|Column name|Data type|Description|
27+
|------|------|-------|
28+
|**job_name**|nvarchar(128)|Name of the job.|
29+
|**job_id**|uniqueidentifier|Unique ID of the job.|
30+
|**job_version**|int|Version of the job (automatically updated each time the job is modified).|
31+
32+
## Permissions
33+
34+
Members of the *jobs_reader* role can SELECT from this view. For more information, see [Elastic jobs in Azure SQL Database (preview)](/azure/azure-sql/database/elastic-jobs-overview?view=azuresql-db&preserve-view=true#elastic-job-database-permissions).
35+
36+
## Remarks
37+
38+
All times in elastic jobs are in the UTC time zone.
39+
40+
## Related content
41+
42+
- [Elastic jobs in Azure SQL Database (preview)](/azure/azure-sql/database/elastic-jobs-overview?view=azuresql-db&preserve-view=true)
43+
- [Create, configure, and manage elastic jobs (preview)](/azure/azure-sql/database/elastic-jobs-tutorial?view=azuresql-db&preserve-view=true)
44+
- [Create and manage elastic jobs by using T-SQL (preview)](/azure/azure-sql/database/elastic-jobs-tsql-create-manage?view=azuresql-db&preserve-view=true)
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
title: "jobs.jobs (Azure Elastic Jobs) (Transact-SQL)"
3+
description: "The jobs.jobs system view contains configuration information about Azure Elastic jobs."
4+
author: WilliamDAssafMSFT
5+
ms.author: wiassaf
6+
ms.date: 10/30/2023
7+
ms.service: sql-database
8+
ms.subservice: system-objects
9+
ms.topic: "reference"
10+
f1_keywords:
11+
- "jobs.jobs"
12+
helpviewer_keywords:
13+
- "jobs catalog view"
14+
- "jobs.jobs catalog view"
15+
dev_langs:
16+
- "TSQL"
17+
monikerRange: "=azuresqldb-current"
18+
---
19+
# jobs.jobs (Azure Elastic Jobs) (Transact-SQL)
20+
21+
[!INCLUDE [Azure SQL Database](../../includes/applies-to-version/asdb.md)]
22+
23+
Contains jobs configurations in the [Azure Elastic Jobs service for Azure SQL Database](/azure/azure-sql/database/elastic-jobs-overview?view=azuresql-db&preserve-view=true).
24+
25+
|Column name | Data type |Description|
26+
|------|------|-------|
27+
|**job_name** | nvarchar(128) | Name of the job.|
28+
|**job_id**| uniqueidentifier | Unique ID of the job.|
29+
|**job_version** |int | Version of the job (automatically updated each time the job is modified).|
30+
|**description** |nvarchar(512)| Description for the job. |
31+
|**enabled** | bit | Indicates whether the job is enabled or disabled. `1` indicates enabled jobs, and `0` indicates disabled jobs.|
32+
|**schedule_interval_type**|nvarchar(50) | Value indicating when the job is to be executed:<br /><br /> - `Once`<br />- `Minutes`<br />- `Hours`<br />- `Days`<br />- `Weeks`<br />- `Months` |
33+
|**schedule_interval_count**|int| Number of `schedule_interval_type` periods to occur between each execution of the job.|
34+
|**schedule_start_time**|datetime2(7)| Date and time the job was last started execution.|
35+
|**schedule_end_time**|datetime2(7)| Date and time the job was last completed execution.|
36+
37+
## Permissions
38+
39+
Members of the *jobs_reader* role can SELECT from this view. For more information, see [Elastic jobs in Azure SQL Database (preview)](/azure/azure-sql/database/elastic-jobs-overview?view=azuresql-db&preserve-view=true#elastic-job-database-permissions).
40+
41+
## Remarks
42+
43+
All times in elastic jobs are in the UTC time zone.
44+
45+
## Examples
46+
47+
### View all enabled jobs in an elastic job agent
48+
49+
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.
50+
51+
```sql
52+
--Connect to the job database specified when creating the job agent
53+
54+
-- View all enabled jobs
55+
SELECT * FROM [jobs].[jobs]
56+
WHERE [enabled] = 1;
57+
```
58+
59+
## Related content
60+
61+
- [jobs.sp_add_job (Azure Elastic Jobs) (Transact-SQL)](../system-stored-procedures/sp-add-job-elastic-jobs-transact-sql.md)
62+
- [jobs.sp_update_job (Azure Elastic Jobs) (Transact-SQL)](../system-stored-procedures/sp-update-job-elastic-jobs-transact-sql.md)
63+
- [Elastic jobs in Azure SQL Database (preview)](/azure/azure-sql/database/elastic-jobs-overview?view=azuresql-db&preserve-view=true)
64+
- [Create, configure, and manage elastic jobs (preview)](/azure/azure-sql/database/elastic-jobs-tutorial?view=azuresql-db&preserve-view=true)
65+
- [Create and manage elastic jobs by using T-SQL (preview)](/azure/azure-sql/database/elastic-jobs-tsql-create-manage?view=azuresql-db&preserve-view=true)

0 commit comments

Comments
 (0)