Skip to content

Commit c8fc9b2

Browse files
authored
Merge pull request #114984 from stevestein/sqledge-5.11
sqledge - refactor dacpac article
2 parents c3d5daa + 560b936 commit c8fc9b2

File tree

4 files changed

+102
-59
lines changed

4 files changed

+102
-59
lines changed
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
title: Using SQL Database DAC packages - Azure SQL Edge (Preview)
3+
description: Learn about using dacpacs in Azure SQL Edge (Preview)
4+
keywords: SQL Edge, sqlpackage
5+
services: sql-database-edge
6+
ms.service: sql-database-edge
7+
ms.topic: conceptual
8+
author: SQLSourabh
9+
ms.author: sourabha
10+
ms.reviewer: sstein
11+
ms.date: 05/19/2020
12+
---
13+
14+
# SQL Database DAC packages in SQL Edge
15+
16+
Azure SQL Edge (Preview) is an optimized relational database engine geared for IoT and edge deployments. It's built on the latest versions of the Microsoft SQL Server Database Engine, which provides industry-leading performance, security, and query processing capabilities. Along with the industry-leading relational database management capabilities of SQL Server, Azure SQL Edge provides in-built streaming capability for real-time analytics and complex event-processing.
17+
18+
Azure SQL Edge also provides a native implementation of SqlPackage.exe that enables you to deploy a [SQL Database DAC](https://docs.microsoft.com/sql/relational-databases/data-tier-applications/data-tier-applications) package during the deployment of SQL Edge. SQL Database dacpacs can be deployed to SQL Edge using the SqlPackage parameter exposed via the `module twin's desired properties` option of the SQL Edge module:
19+
20+
```json
21+
{
22+
"properties.desired":
23+
{
24+
"SqlPackage": "<Optional_DACPAC_ZIP_SAS_URL>",
25+
"ASAJobInfo": "<Optional_ASA_Job_ZIP_SAS_URL>"
26+
}
27+
}
28+
```
29+
30+
|Field | Description |
31+
|------|-------------|
32+
| SqlPackage | Azure Blob storage URI for the *.zip file that contains the SQL Database DAC package.
33+
| ASAJobInfo | Azure Blob storage URI for the ASA Edge job.
34+
35+
## Use a SQL Database DAC package with SQL Edge
36+
37+
To use a SQL Database DAC package (*.dacpac) with SQL Edge, follow these steps:
38+
39+
1. Create or extract a SQL Database DAC package. See [Extracting a DAC from a database](/sql/relational-databases/data-tier-applications/extract-a-dac-from-a-database/) for information on how to generate a DAC package for an existing SQL Server database.
40+
41+
2. Zip the *.dacpac and upload it to an Azure Blob storage account. For more information on uploading files to Azure Blob storage, see [Upload, download, and list blobs with the Azure portal](../storage/blobs/storage-quickstart-blobs-portal.md).
42+
43+
3. Generate a shared access signature for the zip file by using the Azure portal. For more information, see [Delegate access with shared access signatures (SAS)](../storage/common/storage-sas-overview.md).
44+
45+
4. Update the SQL Edge module configuration to include the shared access URI for the DAC package. To update the SQL Edge module, take these steps:
46+
47+
1. In the Azure portal, go to your IoT Hub deployment.
48+
49+
2. In the left pane, select **IoT Edge**.
50+
51+
3. On the **IoT Edge** page, find and select the IoT Edge where the SQL Edge module is deployed.
52+
53+
4. On the **IoT Edge Device** device page, select **Set Module**.
54+
55+
5. On the **Set modules** page, select **Configure** against the SQL Edge module.
56+
57+
6. In the **IoT Edge Custom Modules** pane, select **Set module twin's desired properties**. Update the desired properties to include the URI for the `SQLPackage` option, as shown in the following example.
58+
59+
> [!NOTE]
60+
> The SAS URI in the following JSON is just an example. Replace the URI with the actual URI from your deployment.
61+
62+
```json
63+
{
64+
"properties.desired":
65+
{
66+
"SqlPackage": "<<<SAS URL for the *.zip file containing the dacpac",
67+
}
68+
}
69+
```
70+
71+
7. Select **Save**.
72+
73+
8. On the **Set modules** page, select **Next**.
74+
75+
9. On the **Set modules** page, select **Next** and then **Submit**.
76+
77+
5. After the module update, the DAC package file is downloaded, unzipped, and deployed against the SQL Edge instance.
78+
79+
On each restart of the Azure SQL Edge container, the *.dacpac file package is download and evaluated for changes. If a new version of the dacpac file is encountered, the changes are deployed to the database in SQL Edge.
80+
81+
## Next steps
82+
83+
- [Deploy SQL Edge through Azure portal](deploy-portal.md).
84+
- [Stream Data](stream-data.md)
85+
- [Machine learning and AI with ONNX in SQL Edge (Preview)](onnx-overview.md)

articles/azure-sql-edge/stream-analytics.md

Lines changed: 14 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: Using SQL Database DAC packages and Stream Analytics jobs - Azure SQL Edge (Preview)
2+
title: Using Azure Stream Analytics Edge jobs with Azure SQL Edge (Preview)
33
description: Learn about using Stream Analytics jobs in Azure SQL Edge (Preview)
4-
keywords: SQL Edge, stream analytics, sqlpackage
4+
keywords: SQL Edge, stream analytics,
55
services: sql-database-edge
66
ms.service: sql-database-edge
77
ms.topic: conceptual
@@ -11,13 +11,11 @@ ms.reviewer: sstein
1111
ms.date: 05/19/2020
1212
---
1313

14-
# Using SQL Database DAC packages and Stream Analytics jobs with SQL Edge
14+
# Using Azure Stream Analytics jobs with SQL Edge
1515

1616
Azure SQL Edge (Preview) is an optimized relational database engine geared for IoT and edge deployments. It's built on the latest versions of the Microsoft SQL Server Database Engine, which provides industry-leading performance, security, and query processing capabilities. Along with the industry-leading relational database management capabilities of SQL Server, Azure SQL Edge provides in-built streaming capability for real-time analytics and complex event-processing.
1717

18-
Azure SQL Edge also provides a native implementation of SqlPackage.exe that enables you to deploy a [SQL Database DAC](https://docs.microsoft.com/sql/relational-databases/data-tier-applications/data-tier-applications) package during the deployment of SQL Edge.
19-
20-
Azure SQL Edge exposes two optional parameters through the `module twin's desired properties` option of the IoT Edge module:
18+
Azure SQL Edge has a native implementation of the stream analytics runtime. This implementation enables you to create an Azure Stream Analytics edge job and deploy that job as a SQL Edge streaming job. Azure Stream Analytics jobs can be deployed to SQL Edge using the ASAJobInfo parameter exposed via the `module twin's desired properties` option of the SQL Edge module:
2119

2220
```json
2321
{
@@ -32,57 +30,11 @@ Azure SQL Edge exposes two optional parameters through the `module twin's desire
3230
|Field | Description |
3331
|------|-------------|
3432
| SqlPackage | Azure Blob storage URI for the *.zip file that contains the SQL Database DAC package.
35-
| ASAJobInfo | Azure Blob storage URI for the ASA Edge job. For more information, see [Publishing an ASA Edge job for SQL Edge](#using-streaming-jobs-with-sql-edge).
36-
37-
## Using SQL Database DAC packages with SQL Edge
38-
39-
To use a SQL Database DAC package (*.dacpac) with SQL Edge, take these steps:
40-
41-
1. Create or extract a SQL Database DAC package. See [Extracting a DAC from a database](/sql/relational-databases/data-tier-applications/extract-a-dac-from-a-database/) for information on how to generate a DAC package for an existing SQL Server database.
42-
43-
2. Zip the *.dacpac and upload it to an Azure Blob storage account. For more information on uploading files to Azure Blob storage, see [Upload, download, and list blobs with the Azure portal](../storage/blobs/storage-quickstart-blobs-portal.md).
44-
45-
3. Generate a shared access signature for the zip file by using the Azure portal. For more information, see [Delegate access with shared access signatures (SAS)](../storage/common/storage-sas-overview.md).
46-
47-
4. Update the SQL Edge module configuration to include the shared access URI for the DAC package. To update the SQL Edge module, take these steps:
48-
49-
1. In the Azure portal, go to your IoT Hub deployment.
50-
51-
2. In the left pane, select **IoT Edge**.
52-
53-
3. On the **IoT Edge** page, find and select the IoT Edge where the SQL Edge module is deployed.
54-
55-
4. On the **IoT Edge Device** device page, select **Set Module**.
56-
57-
5. On the **Set modules** page, select **Configure** against the SQL Edge module.
33+
| ASAJobInfo | Azure Blob storage URI for the ASA Edge job.
5834

59-
6. In the **IoT Edge Custom Modules** pane, select **Set module twin's desired properties**. Update the desired properties to include the URI for the `SQLPackage` option, as shown in the following example.
35+
## Create an Azure Stream Analytics Edge Job
6036

61-
> [!NOTE]
62-
> The SAS URI in the following JSON is just an example. Replace the URI with the actual URI from your deployment.
63-
64-
```json
65-
{
66-
"properties.desired":
67-
{
68-
"SqlPackage": "https://StorageAccountName.blob.core.windows.net/SQLpackageFiles/MeasurementsDB.zip?sp=r&st=2019-09-01T00:00:00Z&se=2019-09-30T00:00:00Z&spr=https&sv=2019-02-02&sr=b&sig=Uh8X0E50qzlxkiKVBJKU3ccVQYwF235qTz7AXp4R3gI%3D",
69-
}
70-
}
71-
```
72-
73-
7. Select **Save**.
74-
75-
8. On the **Set modules** page, select **Next**.
76-
77-
9. On the **Set modules** page, select **Next** and then **Submit**.
78-
79-
5. After the module update, the DAC package file is downloaded, unzipped, and deployed against the SQL Edge instance.
80-
81-
## Using streaming jobs with SQL Edge
82-
83-
Azure SQL Edge has a native implementation of the stream analytics runtime. This implementation enables you to create an Azure Stream Analytics edge job and deploy that job as a SQL Edge streaming job. To create a Stream Analytics edge job, complete these steps:
84-
85-
1. Go to the Azure portal by using the preview [URL](https://portal.azure.com/?microsoft_azure_streamanalytics_edgeadapterspreview=true). This preview URL enables you to configure SQL Database output for a Stream Analytics edge job.
37+
1. Go to the Azure portal.
8638

8739
2. Create a new **Azure Stream Analytics on IoT Edge** job. Choose the hosting environment that targets **Edge**.
8840

@@ -133,7 +85,7 @@ Azure SQL Edge has a native implementation of the stream analytics runtime. This
13385
13486
6. Under **Configure**, select **Publish**, and then select the **Publish** button. Save the SAS URI for use with the SQL Edge module.
13587
136-
### Deploy the Stream Analytics edge job to SQL Edge
88+
## Deploy Azure Stream Analytics Edge job to SQL Edge
13789
13890
To deploy the streaming job to the SQL Edge module, update the SQL Edge module configuration to include the SAS URI for the streaming job from the earlier step. To update the SQL Edge module:
13991
@@ -156,7 +108,7 @@ To deploy the streaming job to the SQL Edge module, update the SQL Edge module c
156108
{
157109
"properties.desired":
158110
{
159-
"ASAJobInfo": "https://storageAccountName.blob.core.windows.net/asajobs/ASAEdgeJobs/5a9b34db-7a5c-4606-adae-4c8609eaa1c7/d85b5aa6-4d38-4703-bb34-af7f0bd7916d/ASAEdgeJobDefinition.zip?sv=2018-03-28&sr=b&sig=HH%2BFMsEy378RaTxIy2Xo6rM6wDaqoBaZ5zFDBqdZiS0%3D&st=2019-09-01T22%3A24%3A34Z&se=2019-09-30T22%3A34%3A34Z&sp=r"
111+
"ASAJobInfo": "<<<SAS URL For the published ASA Edge Job>>>>"
160112
}
161113
}
162114
```
@@ -171,4 +123,8 @@ To deploy the streaming job to the SQL Edge module, update the SQL Edge module c
171123
172124
## Next steps
173125
174-
- To get started, see [Deploy SQL Edge through Azure portal](deploy-portal.md).
126+
- [Deploy SQL Edge through Azure portal](deploy-portal.md).
127+
128+
- [Stream Data](stream-data.md)
129+
130+
- [Machine learning and AI with ONNX in SQL Edge (Preview)](onnx-overview.md)

articles/azure-sql-edge/stream-data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ms.date: 05/19/2020
1515

1616
Azure SQL Edge (Preview) provides two different options to implement data streaming.
1717

18-
1. Deploying Azure Streaming Analytics Edge jobs created in Azure. For more information on how to deploy Azure Streaming Analytics Edge jobs in Azure SQL Edge refer [Deploy Azure Stream Analytics Jobs](stream-analytics.md).
18+
1. Deploying Azure Streaming Analytics Edge jobs created in Azure. For more information on how to deploy Azure Streaming Analytics Edge jobs in Azure SQL Edge refer [Deploy Azure Stream Analytics Jobs](deploy-dacpac.md).
1919
2. Using the new **T-SQL Streaming** feature to create streaming jobs in SQL Edge, without the need to configure streaming jobs in Azure.
2020

2121
While its possible to use both options to implement data streaming in SQL Edge, it is highly recommended to use only one. When using both, there may be possible race conditions which impact the functioning of the data streaming operations.

articles/azure-sql-edge/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
href: connect.md
4242
- name: Configure SQL Edge
4343
href: configure.md
44+
- name: Deploy DAC package
45+
href: deploy-dacpac.md
4446
- name: Concepts
4547
items:
4648
- name: Machine learning and AI with ONNX

0 commit comments

Comments
 (0)