Query fn_dblog() for the list of Operation in active transaction of the current session
declare @xactid bigint
declare @transactionid nvarchar(28)
select @xactid = transaction_id from sys.dm_tran_current_transaction
select @transactionid = [transaction id] from fn_dblog(null,null) where [Xact ID] = @xactid
select * from fn_dblog(null,null) where [Transaction ID] = @transactionid
The [Xact ID] introduced in SQL Server 2008 has the transaction id for the operation LOP_BEGIN_XACT and all the transaction occuring in its context share the common transaction with the [transaction id] column
Comments
- Anonymous
April 29, 2009
PingBack from http://asp-net-hosting.simplynetdev.com/query-fn_dblog-for-the-list-of-operation-in-active-transaction-of-the-current-session/