title | description | author | ms.author | ms.reviewer | ms.date | ms.service | ms.subservice | ms.topic | dev_langs | monikerRange | |
---|---|---|---|---|---|---|---|---|---|---|---|
sys.sp_verify_database_ledger_from_digest_storage (Transact-SQL) |
Verifies the database ledger and the table ledgers using digests at the specified external digest storage locations. |
VanMSFT |
vanto |
randolphwest |
03/07/2025 |
sql |
system-objects |
reference |
|
=azuresqldb-current |
[!INCLUDE SQL Server 2022 Azure SQL Database Azure SQL Managed Instance]
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 sys.sp_verify_database_ledger. A caller is expected to provide a JSON document that contains the paths pointing to digest storage locations, such as Azure Blob storage containers.
For more information on database ledger, see Ledger.
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: Transact-SQL syntax conventions
sp_verify_database_ledger_from_digest_storage
[ @locations = ] 'JSON_document_with_digest_storage_locations'
[ , [ @table_name = ] 'table_name' ]
[!INCLUDE extended-stored-procedures]
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. |
The name of the ledger table you want to verify. This argument is optional. If this isn't specified, the whole database ledger and the ledger tables are verified.
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"
},
...
]
0
(success) or 1
(failure).
One row, with one column called last_verified_block_id
.
Requires the VIEW LEDGER CONTENT permission.