Enable automatic digest storage

Applies to: yesSQL Server 2022 (16.x) Preview YesAzure SQL Database

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.

  1. In Security, select the Ledger option.

    Screenshot that shows the Azure portal with the Security Ledger tab selected.

  2. 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.

  3. 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. 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 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://mystorage.blob.core.windows.net';
    

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

Next steps