Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Commit ed92a61

Browse files
committed
Merge branch 'release-dallas' of https://github.com/MicrosoftDocs/sql-docs-pr into release-dallas
2 parents 6c1a817 + 76c84dd commit ed92a61

10 files changed

Lines changed: 217 additions & 32 deletions

azure-sql/database/ledger-landing.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ metadata:
1414
author: VanMSFT
1515
ms.author: vanto
1616
ms.reviewer: kendralittle, mathoma
17-
ms.date: 05/25/2021
17+
ms.date: 07/22/2022
1818

1919
# linkListType: architecture | concept | deploy | download | get-started | how-to-guide | learn | overview | quickstart | reference | tutorial | video | whats-new
2020

@@ -46,6 +46,8 @@ landingContent:
4646
url: /sql/relational-databases/security/ledger/ledger-digest-management
4747
- text: Database verification
4848
url: /sql/relational-databases/security/ledger/ledger-database-verification
49+
- text: Monitor digest uploads
50+
url: /sql/relational-databases/security/ledger/ledger-monitor-digest-uploads
4951

5052

5153
# Card
@@ -117,4 +119,15 @@ landingContent:
117119
- text: sys.sp_verify_database_ledger_from_digest_storage (Transact-SQL)
118120
url: /sql/relational-databases/system-stored-procedures/sys-sp-verify-database-ledger-from-digest-storage-transact-sql
119121
- text: sys.sp_copy_data_in_batches (Transact-SQL)
120-
url: /sql/relational-databases/system-stored-procedures/sys-sp-copy-data-in-batches-transact-sql
122+
url: /sql/relational-databases/system-stored-procedures/sys-sp-copy-data-in-batches-transact-sql
123+
124+
125+
# Card
126+
- title: Ledger video references
127+
linkLists:
128+
- linkListType: video
129+
links:
130+
- text: Bringing the power of blockchain to Azure SQL Database and SQL Server with ledger | Data Exposed
131+
url: https://docs.microsoft.com/shows/data-exposed/bringing-the-power-of-blockchain-to-azure-sql-database-and-sql-server-with-ledger-data-exposed
132+
- text: Learn how Lenovo reinforces trust using ledger in Azure SQL Database
133+
url: https://videos.microsoft.com/customer-stories/watch/xEenNHQerYdRyYqwdYLyXi

azure-sql/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,10 @@
469469
href: /sql/relational-databases/security/ledger/ledger-digest-management
470470
- name: Database verification
471471
href: /sql/relational-databases/security/ledger/ledger-database-verification
472+
- name: Monitor digest uploads
473+
href: /sql/relational-databases/security/ledger/ledger-monitor-digest-uploads
474+
- name: Recover ledger database after tampering
475+
href: /sql/relational-databases/security/ledger/ledger-how-to-recover-after-tampering
472476
- name: Ledger limitations
473477
href: /sql/relational-databases/security/ledger/ledger-limits
474478
- name: Network access controls

docs/relational-databases/security/ledger/ledger-digest-management.md

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Digest management"
33
description: This article provides information on digest management for a ledger database.
4-
ms.date: "05/24/2022"
4+
ms.date: "07/22/2022"
55
ms.service: sql-database
66
ms.subservice: security
77
ms.custom:
@@ -30,15 +30,46 @@ The verification process and the integrity of the database depend on the integri
3030
### Automatic generation and storage of database digests
3131

3232
> [!NOTE]
33-
> Automatic generation and storage of database digests is currently available in Azure SQL Database, but not supported on SQL Server.
33+
> Automatic generation and storage of database digests in SQL Server only supports Azure Storage accounts.
3434
3535
Ledger integrates with the [immutable storage feature of Azure Blob Storage](/azure/storage/blobs/immutable-storage-overview) and [Azure Confidential Ledger](/azure/confidential-ledger/index). This integration provides secure storage services in Azure to help protect the database digests from potential tampering. This integration provides a simple and cost-effective way for users to automate digest management without having to worry about their availability and geographic replication. Azure Confidential Ledger has a stronger integrity guarantee for customers who might be concerned about privileged administrators access to the digest. [This table](/azure/architecture/guide/technology-choices/multiparty-computing-service#confidential-ledger-and-azure-blob-storage) compares the immutable storage feature of Azure Blob Storage with Azure Confidential Ledger.
3636

37-
You can configure automatic generation and storage of database digests through the Azure portal, PowerShell, or the Azure CLI. For more information, see [Enable automatic digest storage](ledger-how-to-enable-automatic-digest-storage.md). When you configure automatic generation and storage, database digests are generated on a predefined interval of 30 seconds and uploaded to the selected storage service. If no transactions occur in the system in the 30-second interval, a database digest won't be generated and uploaded. This mechanism ensures that database digests are generated only when data has been updated in your database. When the endpoint is an Azure Blob Storage, the database server will create a new container, named **sqldbledgerdigests** and use a naming pattern like:
38-
ServerName/DatabaseName/CreationTime. The creation time is needed because a database with the same name can be dropped and recreated or restored, allowing for different “incarnations” of the database under the same name. See [Digest Management Considerations](ledger-digest-management.md)
37+
You can configure automatic generation and storage of database digests through the Azure portal, PowerShell, or the Azure CLI. For more information, see [Enable automatic digest storage](ledger-how-to-enable-automatic-digest-storage.md). When you configure automatic generation and storage, database digests are generated on a predefined interval of 30 seconds and uploaded to the selected storage service. If no transactions occur on the system in the 30-second interval, a database digest won't be generated and uploaded. This mechanism ensures that database digests are generated only when data has been updated in your database. When the endpoint is an Azure Blob Storage, the Azure SQL database server will create a new container, named **sqldbledgerdigests** and use a naming pattern like:
38+
ServerName/DatabaseName/CreationTime. The creation time is needed because a database with the same name can be dropped and recreated or restored, allowing for different “incarnations” of the database under the same name. See [Digest Management Considerations](ledger-digest-management.md).
3939

40-
> [!IMPORTANT]
41-
> If you use Azure Blob Storage, configure an [immutability policy](/azure/storage/blobs/immutable-policy-configure-version-scope) on your container after provisioning to ensure that database digests are protected from tampering.
40+
> [!NOTE]
41+
> For SQL Server, the container needs to be created manually by the user.
42+
43+
#### Azure Storage Account Immutability Policy
44+
45+
If you use an Azure Storage account for the storage of the database digests, configure an [immutability policy](/azure/storage/blobs/immutable-policy-configure-version-scope) on your container after provisioning to ensure that database digests are protected from tampering. Make sure the immutability policy allows protected append writes to append blobs and that the policy is locked.
46+
47+
#### Azure Storage account permission
48+
49+
If you use **Azure SQL Database**, make sure that your logical server (System Identity) has sufficient RBAC permissions to write digests by adding it to the [Storage Blob Data Contributor](/azure/role-based-access-control/built-in-roles#storage-blob-data-contributor) role.
50+
51+
If you use **SQL Server**, you have to create a shared access signature (SAS) key on the digest container to allow SQL Server to connect and authenticate against the Azure Storage account.
52+
53+
- Create a container on the Azure Storage account, named **sqldbledgerdigests**.
54+
- Create a policy on a container with the *Read*, *Add*, *Create*, *Write*, and *List* permissions, and generate a shared access signature key.
55+
- For each container used for digest file storage, create a [SQL Server credential](/sql/relational-databases/security/authentication-access/credentials-database-engine) whose name matches the container path.
56+
57+
The following example assumes that an Azure Storage container, a policy, and a SAS key have been created. This is needed by SQL Server to access the digest files in the container.
58+
59+
In the following code snippet, replace `<your SAS key>` with the SAS key. The SAS key will look like `'sr=c&si=<MYPOLICYNAME>&sig=<THESHAREDACCESSSIGNATURE>'`.
60+
61+
```sql
62+
CREATE CREDENTIAL [https://ledgerstorage.blob.core.windows.net/sqldbledgerdigests]
63+
WITH IDENTITY='SHARED ACCESS SIGNATURE',
64+
SECRET = '<your SAS key>'
65+
```
66+
67+
#### Azure Confidential Ledger Permission
68+
69+
If you use **Azure SQL Database**, make sure that your logical server (System Identity) has sufficient RBAC permissions to write digests by adding it to the **Contributor** role.
70+
71+
> [!NOTE]
72+
> Automatic generation and storage of database digests in SQL Server only supports Azure Storage accounts.
4273
4374
### Manual generation and storage of database digests
4475

@@ -64,19 +95,19 @@ The returned result set is a single row of data. It should be saved to the trust
6495
```
6596

6697
## Digest management considerations
67-
> [!NOTE]
68-
> This section only applies to Azure SQL Database, and not SQL Server.
6998

7099
### Database restore
71100

72-
Restoring the database back to an earlier point in time, also known as [Point in Time Restore](/azure/azure-sql/database/recovery-using-backups#point-in-time-restore), is an operation frequently used when a mistake occurs and users need to quickly revert the state of the database back to an earlier point in time. When uploading the generated digests to Azure Storage or Azure Confidential Ledger, the *create time* of the database is captured that these digests map to. Every time the database is restored, it's tagged with a new *create time* and this technique allows us to store the digests across different “incarnations” of the database. Ledger preserves the information regarding when a restore operation occurred, allowing the verification process to use all the relevant digests across the various incarnations of the database. Additionally, users can inspect all digests for different create times to identify when the database was restored and how far back it was restored to. Since this data is written in immutable storage, this information will be protected as well.
101+
Restoring the database back to an earlier point in time, also known as [Point in Time Restore](/azure/azure-sql/database/recovery-using-backups#point-in-time-restore), is an operation frequently used when a mistake occurs and users need to quickly revert the state of the database back to an earlier point in time. When uploading the generated digests to Azure Storage or Azure Confidential Ledger, the *create time* of the database is captured that these digests map to. Every time the database is restored, it's tagged with a new *create time* and this technique allows us to store the digests across different “incarnations” of the database. For SQL Server, the *create time* is the current UTC time when the digest upload is enabled for the first time. Ledger preserves the information regarding when a restore operation occurred, allowing the verification process to use all the relevant digests across the various incarnations of the database. Additionally, users can inspect all digests for different create times to identify when the database was restored and how far back it was restored to. Since this data is written in immutable storage, this information will be protected as well.
73102

74-
### Active geo-replication
103+
### Active geo-replication and Always On Availability Groups
75104

76-
Replication across geographic regions is asynchronous for performance reasons and, thus, allows the secondary database to be slightly behind compared to the primary. In the event of a geographic failover, any latest data that hasn't yet been replicated is lost. Ledger will only issue database digests for data that has been replicated to geographic secondaries to guarantee that digests will never reference data that might be lost in case of a geographic failover. This only applies for automatic generation and storage of database digests.
105+
Active geo-replication can be configured for an Azure SQL Database. Replication across geographic regions is asynchronous for performance reasons and, thus, allows the secondary database to be slightly behind compared to the primary. In the event of a geographic failover, any latest data that hasn't yet been replicated is lost. Ledger will only issue database digests for data that has been replicated to geographic secondaries to guarantee that digests will never reference data that might be lost in case of a geographic failover. This only applies for automatic generation and storage of database digests.
77106

78107
Dropping the link between the primary and the secondaries when ledger digests are configured isn't supported. You should first disable the *Enable automatic digest storage* database setting, remove the synchronization between the primary and the secondary and re-enable the *Enable automatic digest storage* database setting.
79108

109+
When your database is part of an Always On Availability Group in SQL Server, the same principle as active geo-replication is used. The upload of the digests is only done if all transactions have been replicated to the secondary replicas.
110+
80111
## Next steps
81112

82113
- [Ledger overview](ledger-overview.md)

docs/relational-databases/security/ledger/ledger-how-to-enable-automatic-digest-storage.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,17 @@ ms.topic: how-to
1010
author: VanMSFT
1111
ms.author: vanto
1212
ms.reviewer: kendralittle, mathoma
13-
ms.date: "05/24/2022"
13+
ms.date: "07/22/2022"
1414
monikerRange: "= azuresqldb-current"
15+
zone_pivot_groups: as1-azuresql-sql
1516
---
1617

1718
# Enable automatic digest storage
1819

1920
[!INCLUDE [Azure SQL Database](../../../includes/applies-to-version/asdb.md)]
2021

22+
::: zone pivot="as1-azure-sql-database"
23+
2124
In this article, we'll describe how you can configure automatic generation and storage of database digests through the Azure portal, PowerShell, or the Azure CLI.
2225

2326
## Prerequisites
@@ -79,6 +82,35 @@ az sql db ledger-digest-uploads enable \
7982
```
8083

8184
---
85+
::: zone-end
86+
87+
::: zone pivot="as1-sql-server"
88+
89+
In this article, we'll describe how you can configure automatic generation and storage of database digests through using T-SQL in **SQL Server 2022**. For information on configuring automatic generation and storage of database digests in Azure SQL Database, use the switch at the top of this page to toggle over to Azure SQL Database.
90+
91+
## Prerequisites
92+
93+
- SQL Server 2022
94+
- [SQL Server Management Studio (SSMS)](/sql/ssms/download-sql-server-management-studio-ssms) or [Azure Data Studio](/sql/azure-data-studio/download-azure-data-studio)
95+
- An Azure Blob Storage
96+
- An Azure Storage container
97+
- A [SQL Server credential](/sql/relational-databases/security/authentication-access/credentials-database-engine). For more information, see [Digest Management](ledger-digest-management.md).
98+
99+
## Enable database digest uploads using T-SQL
100+
101+
To enable uploading ledger digests, specify the endpoint of an Azure Blob storage account. To disable uploading ledger digests, set the option value to `OFF`. The default is `OFF`.
102+
103+
1. Sign into your SQL Server 2022 instance using SSMS or Azure Data Studio.
104+
1. Configure automatic generation and storage of database digests using the following T-SQL statement:
105+
106+
```sql
107+
ALTER DATABASE SCOPED CONFIGURATION
108+
SET LEDGER_DIGEST_STORAGE_ENDPOINT = 'https://mystorage.blob.core.windows.net';
109+
```
110+
111+
For more information, see [ALTER DATABASE SCOPED CONFIGURATION (Transact-SQL)](/sql/t-sql/statements/create-database-transact-sql).
112+
113+
::: zone-end
82114

83115
## Next steps
84116

docs/relational-databases/security/ledger/ledger-landing-sql-server.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@ metadata:
1212
ms.devlang:
1313
ms.custom:
1414
- event-tier1-build-2022
15-
- event-tier1-build-2022
16-
- event-tier1-build-2022
1715
ms.topic: landing-page
1816
author: VanMSFT
1917
ms.author: vanto
2018
ms.reviewer: kendralittle, mathoma
21-
ms.date: 05/24/2022
19+
ms.date: 07/22/2022
2220
monikerRange: "= azuresqldb-current||>= sql-server-ver16||>= sql-server-linux-ver16"
2321
titleSuffix: SQL Server and Azure SQL Database
2422
# linkListType: architecture | concept | deploy | download | get-started | how-to-guide | learn | overview | quickstart | reference | tutorial | video | whats-new
@@ -51,6 +49,8 @@ landingContent:
5149
url: ledger-digest-management.md
5250
- text: Database verification
5351
url: ledger-database-verification.md
52+
- text: Monitor digest uploads
53+
url: ledger-monitor-digest-uploads.md
5454

5555

5656
# Card
@@ -118,4 +118,16 @@ landingContent:
118118
- text: sys.sp_verify_database_ledger_from_digest_storage (Transact-SQL)
119119
url: ../../system-stored-procedures/sys-sp-verify-database-ledger-from-digest-storage-transact-sql.md
120120
- text: sys.sp_copy_data_in_batches (Transact-SQL)
121-
url: ../../system-stored-procedures/sys-sp-copy-data-in-batches-transact-sql.md
121+
url: ../../system-stored-procedures/sys-sp-copy-data-in-batches-transact-sql.md
122+
123+
124+
# Card
125+
- title: Ledger video references
126+
linkLists:
127+
- linkListType: video
128+
links:
129+
- text: Bringing the power of blockchain to Azure SQL Database and SQL Server with ledger | Data Exposed
130+
url: https://docs.microsoft.com/shows/data-exposed/bringing-the-power-of-blockchain-to-azure-sql-database-and-sql-server-with-ledger-data-exposed
131+
- text: Learn how Lenovo reinforces trust using ledger in Azure SQL Database
132+
url: https://videos.microsoft.com/customer-stories/watch/xEenNHQerYdRyYqwdYLyXi
133+
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: "Monitor digest uploads"
3+
description: This article provides information on monitoring the digest uploads for ledger.
4+
ms.date: "07/25/2022"
5+
ms.service: sql-database
6+
ms.subservice: security
7+
ms.custom:
8+
ms.reviewer:
9+
ms.topic: conceptual
10+
author: VanMSFT
11+
ms.author: vanto
12+
monikerRange: "= azuresqldb-current||>= sql-server-ver16||>= sql-server-linux-ver16"
13+
zone_pivot_groups: as1-azuresql-sql
14+
---
15+
16+
# Monitor digest uploads
17+
18+
[!INCLUDE [SQL Server 2022 Azure SQL Database](../../../includes/applies-to-version/sqlserver2022-asdb.md)]
19+
20+
::: zone pivot="as1-azure-sql-database"
21+
22+
You can monitor failed and successful ledger digest uploads in the [Azure portal](https://portal.azure.com) in the **Metrics** view of your Azure SQL Database.
23+
24+
:::image type="content" source="media/ledger/monitor-ledger-digest-uploads.png" alt-text="Metrics view of the Azure SQL Database failed and successful ledger digest uploads in the Azure portal.":::
25+
26+
::: zone-end
27+
28+
::: zone pivot="as1-sql-server"
29+
30+
You can monitor failed and successful ledger digest uploads with [Extended Events](../../extended-events/extended-events.md) in SQL Server. Select the events *ledger_digest_upload_failed* and *ledger_digest_upload_success* in the Extended Event session.
31+
32+
::: zone-end
33+
34+
## Digest upload alerts recommendation
35+
36+
::: zone pivot="as1-azure-sql-database"
37+
38+
We recommend you configure alerts on failed ledger digest uploads if you want to be notified when a digest upload failed. Failures might occur due to revoked permissions on the storage account or network configuration that makes the storage account inaccessible. Optionally, you could also configure an alert on successful ledger digest uploads. If the number of successful ledger digest uploads drops under a certain value or zero due to someone disabling the automatic digest upload, the alert can help raise attention to this matter. Digest uploads that are explicitly disabled wouldn't be considered a failure in this case.
39+
40+
::: zone-end
41+
42+
::: zone pivot="as1-sql-server"
43+
44+
We recommend you configure an alert on event number *37417 - Uploading ledger digest failed*. The alert can be configured using [SQL Agent Alert](../../../ssms/agent/create-an-alert-using-an-error-number.md) or your favorite third-party monitoring tool.
45+
46+
::: zone-end
47+
48+
## Next steps
49+
50+
- [Ledger overview](ledger-overview.md)
51+
- [Enable automatic digest storage](ledger-how-to-enable-automatic-digest-storage.md)

0 commit comments

Comments
 (0)