sys.sp_verify_database_ledger_from_digest_storage (Transact-SQL)

Applies to: YesAzure SQL Database

Verifies the database ledger and the table ledgers using digests at the specified external digest storage locations.

This stored procedure implements the same ledger verification algorithm as sp_verify_database_ledger. A caller is expected to provider a JSON, which contains the paths pointing to digest storage locations, such as Azure Blob storage containers.

For more information on database ledger, see Azure SQL Database ledger

Topic link icon Transact-SQL Syntax Conventions

Syntax

sp_verify_database_ledger_from_digest_storage [@locations = ] 'JSON_document_with_digest_storage_locations' [ , [@table_name = ] 'table_name' ] 

Arguments

[ @locations = ] 'JSON_document_with_digest_storage_locations'

A JSON document containing a list of ledger digests locations:

Column name JSON data type Description
path string The location of storage digests. For example, a path for a container in Azure blob storage.
last_digest_block_id int The block ID for the last digest uploaded.
is_current boolean Indicates whether this is the current path or a path used in the past.

Example of the input JSON document:

[{"path": “https://mystorage.blob.core.windows.net/sqldbledgerdigests/serverName/DatabaseName/2020-1-1 00:00:00Z”, “last_digest_block_id”:42, "is_current:true"} , … ]

Return code values

0 (success) or 1 (failure).

Result sets

None.

Permissions

Requires the VIEW LEDGER CONTENT permission.

See also