Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates and technical support.

Download Microsoft Edge More info about Internet Explorer and Microsoft Edge
Read in English
Read in English Edit
Twitter LinkedIn Facebook Email

Ledger documentation

Find documentation about ledger for SQL Server 2022 and Azure SQL Database

Ledger overview

Overview

  • What is ledger?

Ledger concepts

Concept

  • What is the database ledger?
  • Append-only ledger tables
  • Updatable ledger tables
  • Digest management
  • Database verification
  • Monitor digest uploads

Ledger quickstarts

Quickstart

  • Create an Azure SQL Database with ledger enabled

Using ledger

How-To Guide

  • Create append-only ledger tables
  • Create updatable ledger tables
  • Enable automatic digest storage
  • Migrate data from regular tables to ledger tables
  • Recover ledger database after tampering
  • Verify a ledger table to detect tampering

Ledger references

Reference

  • Current ledger limitations
  • Ledger whitepaper

Ledger System Catalog Views

Reference

  • sys.database_ledger_blocks (Transact-SQL)
  • sys.database_ledger_transactions (Transact-SQL)
  • sys.database_ledger_digest_locations (Transact-SQL)
  • sys.ledger_table_history (Transact-SQL)
  • sys.ledger_column_history (Transact-SQL)

Ledger Store Procedures

Reference

  • sys.sp_generate_database_ledger_digest (Transact-SQL)
  • sys.sp_verify_database_ledger (Transact-SQL)
  • sys.sp_verify_database_ledger_from_digest_storage (Transact-SQL)
  • sys.sp_copy_data_in_batches (Transact-SQL)

Ledger video references

video

  • Bringing the power of blockchain to Azure SQL Database and SQL Server with ledger | Data Exposed
  • Learn how Lenovo reinforces trust using ledger in Azure SQL Database
  • Previous versions
  • Blog
  • Contribute
  • Privacy
  • Terms of Use
  • Trademarks
  • © Microsoft 2023
  • Previous versions
  • Blog
  • Contribute
  • Privacy
  • Terms of Use
  • Trademarks
  • © Microsoft 2023