แก้ไข

แชร์ผ่าน


Enable automatic digest storage

Applies to: SQL Server 2022 (16.x) Azure SQL Database Azure SQL Managed Instance

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.

Prerequisites

Enable automatic digest storage using the Azure portal

  1. Open the Azure portal and locate the database for which you want to enable automatic digest storage. Select that database in SQL Database.

    Note

    Enable automatic digest storage can also be configured when creating a new database.

  2. In Security, select the Ledger option.

  3. In the Ledger pane, select Enable automatic digest storage. Select the storage type. You can choose between Azure Storage or Azure Confidential Ledger (ACL). Depending on the storage type you picked, you have to select an existing storage account or ACL, or create a new one. The storage container name is fixed and can't be modified.

    Screenshot that shows the selections for enabling digest storage.

  4. Select Save to save your automatic digest storage configuration.

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.

Prerequisites

  • Have an active Azure subscription. If you don't have one, create a free account.
  • An Azure SQL Managed Instance

Enable automatic digest storage using the Azure portal

  1. Open the Azure portal and locate the managed database for which you want to enable automatic digest storage.

    Note

    Enable automatic digest storage can also be configured when creating a new database.

  2. In Security, select the Ledger option.

  3. In the Ledger pane, select Enable automatic digest storage. Select the storage type. You can choose between Azure Storage or Azure Confidential Ledger (ACL). Depending on the storage type you picked, you have to select an existing storage account or ACL, or create a new one. The storage container name is fixed and can't be modified.

    Screenshot that shows the selections for enabling digest storage.

  4. Select Save to save your automatic digest storage configuration.

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 (16.x). 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.

Prerequisites

Enable database digest uploads using T-SQL

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.

  1. Sign into your SQL Server 2022 (16.x) instance using SSMS or Azure Data Studio.

  2. Configure automatic generation and storage of database digests using the following T-SQL statement:

    ALTER DATABASE SCOPED CONFIGURATION
     SET LEDGER_DIGEST_STORAGE_ENDPOINT = 'https://ledgerstorage.blob.core.windows.net';
    

For more information, see ALTER DATABASE SCOPED CONFIGURATION (Transact-SQL).