question

Sagar Bhargava avatar image
Sagar Bhargava asked

Identify committed transactions

Is there a way to identify committed transactions which are no longer active and not yet moved by the capture process and how much transaction log space they are using in a CDC enabled database? I can get the details for Active processes using sys.dm_tran_database_transactions DMV.
transaction-logtransactioncdc
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Grant Fritchey avatar image
Grant Fritchey answered
No. Once a transaction is committed, it's written to the log and is not open to being queried. If CDC is in place, that's part of a successfully completed transaction, so it should be in the CDC data too. It's not something you can query. There is an undocumented function that lets you read the log, but I'm not sure what you'll be looking for there. All completed transactions are in the log.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.