Applies to: SQL Server 2022 (16.x) Azure SQL Database Azure SQL Managed Instance
Captures the cryptographically protected history of database transactions against ledger tables in the database. A row in this view represents a database transaction.
For more information on database ledger, see Ledger.
|Column name||Data type||Description|
|transaction_id||bigint||A transaction ID that is unique for the database (it corresponds to a transaction ID in the database transaction log).|
|block_id||bigint||A sequence number identifying a row.|
|transactional_ordinal||int||Offset of the transaction in the block.|
|commit_time||datetime2(7)||The time of the committing transaction.|
|principal_name||sysname||The name of the user who started the transaction. Captured by calling
|table_hashes||varbinary(max)||This is a set of key-values pairs, stored in a binary format. The keys are object IDs (from sys.objects) of ledger database tables, modified by the transaction. Each value is a SHA-256 hash of all row versions a transaction created or invalidated.
The binary format of data stored in this row is:
Requires the VIEW LEDGER CONTENT permission.