sys.dm_tran_database_transactions (Windows Azure SQL Database)
Returns information about transactions at the database level. The following table demonstrates the supported columns in Microsoft Windows Azure SQL Database.
| Column name | Data type | Description |
|---|---|---|
|
transaction_id |
bigint |
The ID of the transaction at the instance level, not the database level. It is only unique across all databases within an instance, but not unique across all server instances. |
|
database_id |
int |
The ID of the database associated with the transaction. |
|
database_transaction_begin_time |
datetime |
The time at which the database became involved in the transaction. Specifically, it is the time of the first log record in the database for the transaction. |
|
database_transaction_type |
int |
1 = Read/write transaction 2 = Read-only transaction 3 = System transaction |
|
database_transaction_state |
int |
1 = The transaction has not been initialized. 3 = The transaction has been initialized but has not generated any log records. 4 = The transaction has generated log records. 5 = The transaction has been prepared. 10 = The transaction has been committed. 11 = The transaction has been rolled back. 12 = The transaction is being committed. In this state the log record is being generated, but it has not been materialized or persisted. |
|
database_transaction_status |
int |
Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. |
|
database_transaction_status2 |
int |
Identified for informational purposes only. Not supported. Future compatibility is not guaranteed. |
Requires VIEW DATABASE STATE permission on server.
Windows Azure SQL Database does not support the following columns with the sys.dm_trans_database_transactions system view:
-
database_transaction_begin_lsn
-
database_transaction_commit_lsn
-
database_transaction_last_lsn
-
database_transaction_last_rollback_lsn
-
database_transaction_log_bytes_reserved
-
database_transaction_log_bytes_reserved_system
-
database_transaction_log_bytes_used
-
database_transaction_log_bytes_used_system
-
database_transaction_log_record_count
-
database_transaction_most_recent_savepoint_lsn
-
database_transaction_next_undo_lsn
-
database_transaction_replicate_record_count
For more information about the sys.dm_tran_database_transactions system view, see sys.dm_tran_database_transactions (Transact-SQL) in SQL Server Books Online.