{"id":473,"date":"2012-10-04T21:15:00","date_gmt":"2012-10-04T21:15:00","guid":{"rendered":"\/blogs\/paul\/post\/Parent-transaction-ID-in-2012-fn_dblog-output.aspx"},"modified":"2013-01-02T09:25:16","modified_gmt":"2013-01-02T17:25:16","slug":"parent-transaction-id-in-2012-fn_dblog-output","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/paul\/parent-transaction-id-in-2012-fn_dblog-output\/","title":{"rendered":"Parent transaction ID in 2012 fn_dblog output"},"content":{"rendered":"<p>All kinds of little bits of information have been added to the output of various DMVs, functions, and commands in SQL Server 2012.<\/p>\n<p>One which I only discovered recently, and about which I&#8217;m really excited (ok, I should probably get out more :-), is the inclusion of the parent transaction ID in the output of fn_dblog. This allows us to see which transaction is the parent of nested system transactions\u00a0and other sub-transactions.<\/p>\n<p>You might wonder why I care? It allows us to see the hierarchy and definitive order of transactions during operations we&#8217;re performing with SQL Server, to aid in working out how operations work under the covers, rather than having to guess and assume.<\/p>\n<p>For instance, when inserting the first row into a new table, the allocation system has to allocate a page from a mixed extent. Using the new field, we can see the definitive order of operations:<\/p>\n<p><span style=\"font-family: 'courier new', courier; font-size: small;\">CREATE TABLE t1 (c1 INT);<br \/>\nGO<\/span><\/p>\n<p><span style=\"font-family: 'courier new', courier; font-size: small;\">CHECKPOINT;<br \/>\nGO<\/span><\/p>\n<p><span style=\"font-family: 'courier new', courier; font-size: small;\">INSERT INTO t1 VALUES (1);<br \/>\nGO<\/span><\/p>\n<p><span style=\"font-family: 'courier new', courier; font-size: small;\">SELECT<br \/>\n[Current LSN],<br \/>\n[Operation],<br \/>\n[Context],<br \/>\n[Transaction ID],<br \/>\n[AllocUnitName],<br \/>\n[Transaction Name],<br \/>\n[Parent Transaction ID]<br \/>\nFROM fn_dblog (NULL, NULL);<br \/>\nGO<\/span><\/p>\n<p><span style=\"font-family: 'courier new', courier; font-size: small;\">Current LSN\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Operation\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Context\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Transaction ID AllocUnitName\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Transaction Name\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 Parent Transaction ID<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\n00000119:000001c2:0001\u00a0 <strong>LOP_BEGIN_XACT\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LCX_NULL\u00a0\u00a0\u00a0\u00a0\u00a0 0000:0000a216\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 INSERT\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL<br \/>\n<\/strong>00000119:000001c2:0002\u00a0 <strong>LOP_BEGIN_XACT\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LCX_NULL\u00a0\u00a0\u00a0\u00a0\u00a0 0000:0000a217\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 AllocHeapPageSimpleXactDML 0000:0000a216<br \/>\n<\/strong>00000119:000001c2:0003\u00a0 LOP_LOCK_XACT\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LCX_NULL\u00a0\u00a0\u00a0\u00a0\u00a0 0000:0000a217\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL<br \/>\n00000119:000001c2:0004\u00a0 LOP_SET_BITS\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LCX_SGAM\u00a0\u00a0\u00a0\u00a0\u00a0 0000:00000000\u00a0 Unknown Alloc Unit\u00a0\u00a0\u00a0\u00a0\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL<br \/>\n00000119:000001c2:0005\u00a0 <strong>LOP_BEGIN_XACT\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LCX_NULL\u00a0\u00a0\u00a0\u00a0\u00a0 0000:0000a218\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 AllocFirstPage\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0000:0000a217<br \/>\n<\/strong>00000119:000001c2:0006\u00a0 LOP_MODIFY_ROW\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LCX_PFS\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0000:0000a218\u00a0 dbo.t1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL<br \/>\n00000119:000001c2:0007\u00a0 <strong>LOP_BEGIN_XACT\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LCX_NULL\u00a0\u00a0\u00a0\u00a0\u00a0 0000:0000a219\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 AllocMixedExtent\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0000:0000a217<br \/>\n<\/strong>00000119:000001c2:0008\u00a0 LOP_SET_BITS\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LCX_GAM\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0000:0000a219\u00a0 Unknown Alloc Unit\u00a0\u00a0\u00a0\u00a0\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL<br \/>\n00000119:000001c2:0009\u00a0 LOP_SET_BITS\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LCX_SGAM\u00a0\u00a0\u00a0\u00a0\u00a0 0000:0000a219\u00a0 Unknown Alloc Unit\u00a0\u00a0\u00a0\u00a0\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL<br \/>\n00000119:000001c2:000a\u00a0 LOP_COMMIT_XACT\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LCX_NULL\u00a0\u00a0\u00a0\u00a0\u00a0 0000:0000a219\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL<br \/>\n00000119:000001c2:000b\u00a0 LOP_MODIFY_ROW\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LCX_PFS\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0000:0000a217\u00a0 Unknown Alloc Unit\u00a0\u00a0\u00a0\u00a0\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL<br \/>\n00000119:000001c2:000c\u00a0 LOP_FORMAT_PAGE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LCX_IAM\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0000:0000a217\u00a0 dbo.t1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL<br \/>\n00000119:000001c2:000d\u00a0 LOP_HOBT_DELTA\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LCX_NULL\u00a0\u00a0\u00a0\u00a0\u00a0 0000:0000a217\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL<br \/>\n00000119:000001c2:000e\u00a0 LOP_MODIFY_ROW\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LCX_IAM\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0000:0000a218\u00a0 dbo.t1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL<br \/>\n00000119:000001c2:000f\u00a0 LOP_CREATE_ALLOCCHAIN LCX_NULL\u00a0\u00a0\u00a0\u00a0\u00a0 0000:0000a217\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL<br \/>\n00000119:000001c2:0010\u00a0 LOP_LOCK_XACT\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LCX_NULL\u00a0\u00a0\u00a0\u00a0\u00a0 0000:0000a217\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL<br \/>\n00000119:000001c2:0011\u00a0 LOP_COMMIT_XACT\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LCX_NULL\u00a0\u00a0\u00a0\u00a0\u00a0 0000:0000a218\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL<br \/>\n00000119:000001c2:0012\u00a0 LOP_HOBT_DELTA\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LCX_NULL\u00a0\u00a0\u00a0\u00a0\u00a0 0000:0000a217\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL<br \/>\n00000119:000001c2:0013\u00a0 LOP_LOCK_XACT\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LCX_NULL\u00a0\u00a0\u00a0\u00a0\u00a0 0000:0000a217\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL<br \/>\n00000119:000001c2:0014\u00a0 LOP_ROOT_CHANGE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LCX_CLUSTERED 0000:0000a217\u00a0 sys.sysallocunits.clust NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL<br \/>\n00000119:000001c2:0015\u00a0 LOP_LOCK_XACT\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LCX_NULL\u00a0\u00a0\u00a0\u00a0\u00a0 0000:0000a217\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL<br \/>\n00000119:000001c2:0016\u00a0 LOP_ROOT_CHANGE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LCX_CLUSTERED 0000:0000a217\u00a0 sys.sysallocunits.clust NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL<br \/>\n00000119:000001c2:0017\u00a0 LOP_FORMAT_PAGE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LCX_HEAP\u00a0\u00a0\u00a0\u00a0\u00a0 0000:0000a217\u00a0 dbo.t1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL<br \/>\n00000119:000001c2:0018\u00a0 LOP_LOCK_XACT\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LCX_NULL\u00a0\u00a0\u00a0\u00a0\u00a0 0000:0000a217\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL<br \/>\n00000119:000001c2:0019\u00a0 LOP_ROOT_CHANGE\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LCX_CLUSTERED 0000:0000a217\u00a0 sys.sysallocunits.clust NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL<br \/>\n00000119:000001c2:001a\u00a0 LOP_COMMIT_XACT\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LCX_NULL\u00a0\u00a0\u00a0\u00a0\u00a0 0000:0000a217\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL<br \/>\n00000119:000001c2:001b\u00a0 LOP_INSERT_ROWS\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LCX_HEAP\u00a0\u00a0\u00a0\u00a0\u00a0 0000:0000a216\u00a0 dbo.t1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL<br \/>\n00000119:000001c2:001c\u00a0 <strong>LOP_SET_FREE_SPACE\u00a0\u00a0\u00a0 LCX_PFS\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 0000:00000000<\/strong>\u00a0 Unknown Alloc Unit\u00a0\u00a0\u00a0\u00a0\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL<br \/>\n00000119:000001c2:001d\u00a0 LOP_COMMIT_XACT\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 LCX_NULL\u00a0\u00a0\u00a0\u00a0\u00a0 0000:0000a216\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 NULL<\/span><\/p>\n<p>Pretty darn cool, eh?\u00a0We can see that the system started an implicit transaction for us, which it called INSERT. This then started a\u00a0sub-transaction called AllocHeapPageSimpleXactDML to handle the internals of the allocating a page. This in turn started two further sub-sub-transactions to deal with the extent allocation and allocating the page.<\/p>\n<p>&gt;Note that the setting of the free space of the new page in the PFS is not done as part of a transaction (called being non-transactional), as it would be impossible to maintain transactional free space bits without causing major blocking in the system.<\/p>\n<p>In future I&#8217;ll be making use of this in my spelunking exercises.<\/p>\n<p>Enjoy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>All kinds of little bits of information have been added to the output of various DMVs, functions, and commands in SQL Server 2012. One which I only discovered recently, and about which I&#8217;m really excited (ok, I should probably get out more :-), is the inclusion of the parent transaction ID in the output of [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48,98,100],"tags":[],"class_list":["post-473","post","type-post","status-publish","format-standard","hentry","category-inside-the-storage-engine","category-transaction-log","category-undocumented-commands"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Parent transaction ID in 2012 fn_dblog output - Paul S. Randal<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sqlskills.com\/blogs\/paul\/parent-transaction-id-in-2012-fn_dblog-output\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Parent transaction ID in 2012 fn_dblog output - Paul S. Randal\" \/>\n<meta property=\"og:description\" content=\"All kinds of little bits of information have been added to the output of various DMVs, functions, and commands in SQL Server 2012. One which I only discovered recently, and about which I&#8217;m really excited (ok, I should probably get out more :-), is the inclusion of the parent transaction ID in the output of [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/paul\/parent-transaction-id-in-2012-fn_dblog-output\/\" \/>\n<meta property=\"og:site_name\" content=\"Paul S. Randal\" \/>\n<meta property=\"article:published_time\" content=\"2012-10-04T21:15:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-01-02T17:25:16+00:00\" \/>\n<meta name=\"author\" content=\"Paul Randal\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Paul Randal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/parent-transaction-id-in-2012-fn_dblog-output\/\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/parent-transaction-id-in-2012-fn_dblog-output\/\",\"name\":\"Parent transaction ID in 2012 fn_dblog output - Paul S. Randal\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#website\"},\"datePublished\":\"2012-10-04T21:15:00+00:00\",\"dateModified\":\"2013-01-02T17:25:16+00:00\",\"author\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/parent-transaction-id-in-2012-fn_dblog-output\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlskills.com\/blogs\/paul\/parent-transaction-id-in-2012-fn_dblog-output\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/parent-transaction-id-in-2012-fn_dblog-output\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Parent transaction ID in 2012 fn_dblog output\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#website\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/\",\"name\":\"Paul S. Randal\",\"description\":\"In Recovery...\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce\",\"name\":\"Paul Randal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g\",\"caption\":\"Paul Randal\"},\"sameAs\":[\"http:\/\/3.209.169.194\/blogs\/paul\"],\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/author\/paul\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Parent transaction ID in 2012 fn_dblog output - Paul S. Randal","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sqlskills.com\/blogs\/paul\/parent-transaction-id-in-2012-fn_dblog-output\/","og_locale":"en_US","og_type":"article","og_title":"Parent transaction ID in 2012 fn_dblog output - Paul S. Randal","og_description":"All kinds of little bits of information have been added to the output of various DMVs, functions, and commands in SQL Server 2012. One which I only discovered recently, and about which I&#8217;m really excited (ok, I should probably get out more :-), is the inclusion of the parent transaction ID in the output of [&hellip;]","og_url":"https:\/\/www.sqlskills.com\/blogs\/paul\/parent-transaction-id-in-2012-fn_dblog-output\/","og_site_name":"Paul S. Randal","article_published_time":"2012-10-04T21:15:00+00:00","article_modified_time":"2013-01-02T17:25:16+00:00","author":"Paul Randal","twitter_misc":{"Written by":"Paul Randal","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/parent-transaction-id-in-2012-fn_dblog-output\/","url":"https:\/\/www.sqlskills.com\/blogs\/paul\/parent-transaction-id-in-2012-fn_dblog-output\/","name":"Parent transaction ID in 2012 fn_dblog output - Paul S. Randal","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#website"},"datePublished":"2012-10-04T21:15:00+00:00","dateModified":"2013-01-02T17:25:16+00:00","author":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce"},"breadcrumb":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/parent-transaction-id-in-2012-fn_dblog-output\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/paul\/parent-transaction-id-in-2012-fn_dblog-output\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/parent-transaction-id-in-2012-fn_dblog-output\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/paul\/"},{"@type":"ListItem","position":2,"name":"Parent transaction ID in 2012 fn_dblog output"}]},{"@type":"WebSite","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#website","url":"https:\/\/www.sqlskills.com\/blogs\/paul\/","name":"Paul S. Randal","description":"In Recovery...","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sqlskills.com\/blogs\/paul\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce","name":"Paul Randal","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0b6a266bba2f088f2551ef529293001bd73bf026bc1908b9866728c062beeeb6?s=96&d=mm&r=g","caption":"Paul Randal"},"sameAs":["http:\/\/3.209.169.194\/blogs\/paul"],"url":"https:\/\/www.sqlskills.com\/blogs\/paul\/author\/paul\/"}]}},"_links":{"self":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts\/473","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/comments?post=473"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts\/473\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/media?parent=473"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/categories?post=473"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/tags?post=473"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}