{"id":1177,"date":"2007-10-01T01:53:53","date_gmt":"2007-10-01T01:53:53","guid":{"rendered":"\/blogs\/paul\/post\/Inside-the-Storage-Engine-Using-DBCC-PAGE-and-DBCC-IND-to-find-out-if-page-splits-ever-roll-back.aspx"},"modified":"2013-01-01T19:36:51","modified_gmt":"2013-01-02T03:36:51","slug":"inside-the-storage-engine-using-dbcc-page-and-dbcc-ind-to-find-out-if-page-splits-ever-roll-back","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/paul\/inside-the-storage-engine-using-dbcc-page-and-dbcc-ind-to-find-out-if-page-splits-ever-roll-back\/","title":{"rendered":"Inside the Storage Engine: Using DBCC PAGE and DBCC IND to find out if page splits ever roll back"},"content":{"rendered":"<p><FONT face=Verdana><FONT size=2><br \/>\n<P>Time for the first post in the <EM>Inside the Storage Engine<\/EM> series. I&#8217;m going to focus on SQL Server 2005 in this series and I&#8217;ll point out major differences between 2005 and previous versions. Please drop me a line if there&#8217;s something you&#8217;d like to see explained and demo&#8217;d.<\/P><br \/>\n<P>Before jumping into how things work, I&#8217;d like to go over two commands I&#8217;ll be using a lot &#8211; DBCC PAGE and DBCC IND. These are both undocumented and unsupported commands, but are very safe to use as they&#8217;re used extensively inside and outside Microsoft when troubleshooting. Nevertheless, use at your own risk. They&#8217;re quite well known in the SQL community and I and others have publicized them before (I even demo&#8217;d them last year at ITForum in Spain).<\/P><br \/>\n<P>To illustrate their use, I&#8217;m going to use a simple script I wrote to prove that page splits never roll back. I was having a discussion with someone a while ago about this question and the answer is always no. A page split occurs when an insert or update&nbsp;has to happen at a certain point in an index page, and there&#8217;s no room on the page to accomomodate the new or updated record. Page splits are done internally as separate &#8216;system&#8217; transactions. Once a system transaction commits, it cannot be rolled back &#8211; even if the user transaction it was part of rolls back.<\/P><br \/>\n<P>So, let&#8217;s run through the script. First thing to do is create a database containing a table with an index (as page splits only happen in indexes).<\/P><FONT color=#0000ff><br \/>\n<BLOCKQUOTE dir=ltr style=\"MARGIN-RIGHT: 0px\"><br \/>\n<P><FONT face=\"Courier New\">USE<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> <\/FONT><FONT color=#0000ff>MASTER<\/FONT><FONT color=#808080>;<\/P><\/FONT><\/FONT><FONT face=\"Courier New\"><br \/>\n<P>GO<\/P><\/FONT><FONT color=#0000ff><br \/>\n<P><FONT face=\"Courier New\">IF<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> <\/FONT><FONT color=#ff00ff>DATABASEPROPERTY<\/FONT><FONT color=#000000> <\/FONT><FONT color=#808080>(<\/FONT><FONT color=#000000>N<\/FONT><FONT color=#ff0000>&#8216;pagesplittest&#8217;<\/FONT><FONT color=#808080>,<\/FONT><FONT color=#000000> <\/FONT><FONT color=#ff0000>&#8216;Version&#8217;<\/FONT><FONT color=#808080>)<\/FONT><FONT color=#000000> <\/FONT><FONT color=#808080>&gt;<\/FONT><FONT color=#000000> 0 <\/FONT><FONT color=#0000ff>DROP<\/FONT><FONT color=#000000> <\/FONT><FONT color=#0000ff>DATABASE<\/FONT><FONT color=#000000> pagesplittest<\/FONT><FONT color=#808080>;<\/P><\/FONT><\/FONT><FONT face=\"Courier New\"><br \/>\n<P>GO<\/P><\/FONT><FONT color=#0000ff><br \/>\n<P><FONT face=\"Courier New\">CREATE<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> <\/FONT><FONT color=#0000ff>DATABASE<\/FONT><FONT color=#000000> pagesplittest<\/FONT><FONT color=#808080>;<\/P><\/FONT><\/FONT><FONT face=\"Courier New\"><br \/>\n<P>GO<\/P><\/FONT><FONT color=#0000ff><br \/>\n<P><FONT face=\"Courier New\">USE<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> pagesplittest<\/FONT><FONT color=#808080>;<\/P><\/FONT><\/FONT><FONT face=\"Courier New\"><br \/>\n<P>GO<\/P><\/FONT><FONT color=#0000ff><br \/>\n<P><FONT face=\"Courier New\">CREATE<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> <\/FONT><FONT color=#0000ff>TABLE<\/FONT><FONT color=#000000> t1 <\/FONT><FONT color=#808080>(<\/FONT><FONT color=#000000>c1 <\/FONT><FONT color=#0000ff>INT<\/FONT><FONT color=#808080>,<\/FONT><FONT color=#000000> c2 <\/FONT><FONT color=#0000ff>VARCHAR<\/FONT><FONT color=#000000> <\/FONT><FONT color=#808080>(<\/FONT><FONT color=#000000>1000<\/FONT><FONT color=#808080>));<\/P><\/FONT><\/FONT><FONT color=#0000ff><br \/>\n<P><FONT face=\"Courier New\">CREATE<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> <\/FONT><FONT color=#0000ff>CLUSTERED<\/FONT><FONT color=#000000> <\/FONT><FONT color=#0000ff>INDEX<\/FONT><FONT color=#000000> t1c1 <\/FONT><FONT color=#0000ff>ON<\/FONT><FONT color=#000000> t1 <\/FONT><FONT color=#808080>(<\/FONT><FONT color=#000000>c1<\/FONT><FONT color=#808080>);<\/P><\/FONT><\/FONT><FONT size=2><br \/>\n<P><FONT face=\"Courier New\">GO<\/FONT><\/P><\/BLOCKQUOTE><br \/>\n<P dir=ltr>Now I&#8217;m going to fill up a page in the index, but leave a gap in the c1 values so that I can force a page split by inserting the missing key value.<\/P><FONT color=#0000ff><br \/>\n<BLOCKQUOTE dir=ltr style=\"MARGIN-RIGHT: 0px\"><br \/>\n<P><FONT face=\"Courier New\">INSERT<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> <\/FONT><FONT color=#0000ff>INTO<\/FONT><FONT color=#000000> t1 <\/FONT><FONT color=#0000ff>VALUES<\/FONT><FONT color=#000000> <\/FONT><FONT color=#808080>(<\/FONT><FONT color=#000000>1<\/FONT><FONT color=#808080>,<\/FONT><FONT color=#000000> <\/FONT><FONT color=#ff00ff>REPLICATE<\/FONT><FONT color=#000000> <\/FONT><FONT color=#808080>(<\/FONT><FONT color=#ff0000>&#8216;a&#8217;<\/FONT><FONT color=#808080>,<\/FONT><FONT color=#000000> 900<\/FONT><FONT color=#808080>));<\/P><\/FONT><\/FONT><FONT color=#0000ff><br \/>\n<P><FONT face=\"Courier New\">INSERT<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> <\/FONT><FONT color=#0000ff>INTO<\/FONT><FONT color=#000000> t1 <\/FONT><FONT color=#0000ff>VALUES<\/FONT><FONT color=#000000> <\/FONT><FONT color=#808080>(<\/FONT><FONT color=#000000>2<\/FONT><FONT color=#808080>,<\/FONT><FONT color=#000000> <\/FONT><FONT color=#ff00ff>REPLICATE<\/FONT><FONT color=#000000> <\/FONT><FONT color=#808080>(<\/FONT><FONT color=#ff0000>&#8216;b&#8217;<\/FONT><FONT color=#808080>,<\/FONT><FONT color=#000000> 900<\/FONT><FONT color=#808080>));<\/P><\/FONT><\/FONT><FONT color=#0000ff><br \/>\n<P><FONT face=\"Courier New\">INSERT<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> <\/FONT><FONT color=#0000ff>INTO<\/FONT><FONT color=#000000> t1 <\/FONT><FONT color=#0000ff>VALUES<\/FONT><FONT color=#000000> <\/FONT><FONT color=#808080>(<\/FONT><FONT color=#000000>3<\/FONT><FONT color=#808080>,<\/FONT><FONT color=#000000> <\/FONT><FONT color=#ff00ff>REPLICATE<\/FONT><FONT color=#000000> <\/FONT><FONT color=#808080>(<\/FONT><FONT color=#ff0000>&#8216;c&#8217;<\/FONT><FONT color=#808080>,<\/FONT><FONT color=#000000> 900<\/FONT><FONT color=#808080>));<\/P><\/FONT><\/FONT><FONT color=#0000ff><br \/>\n<P><FONT face=\"Courier New\">INSERT<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> <\/FONT><FONT color=#0000ff>INTO<\/FONT><FONT color=#000000> t1 <\/FONT><FONT color=#0000ff>VALUES<\/FONT><FONT color=#000000> <\/FONT><FONT color=#808080>(<\/FONT><FONT color=#000000>4<\/FONT><FONT color=#808080>,<\/FONT><FONT color=#000000> <\/FONT><FONT color=#ff00ff>REPLICATE<\/FONT><FONT color=#000000> <\/FONT><FONT color=#808080>(<\/FONT><FONT color=#ff0000>&#8216;d&#8217;<\/FONT><FONT color=#808080>,<\/FONT><FONT color=#000000> 900<\/FONT><FONT color=#808080>));<\/P><\/FONT><\/FONT><FONT face=\"Courier New\" color=#008000><br \/>\n<P>&#8212; leave a gap at 5<\/P><\/FONT><FONT color=#0000ff><br \/>\n<P><FONT face=\"Courier New\">INSERT<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> <\/FONT><FONT color=#0000ff>INTO<\/FONT><FONT color=#000000> t1 <\/FONT><FONT color=#0000ff>VALUES<\/FONT><FONT color=#000000> <\/FONT><FONT color=#808080>(<\/FONT><FONT color=#000000>6<\/FONT><FONT color=#808080>,<\/FONT><FONT color=#000000> <\/FONT><FONT color=#ff00ff>REPLICATE<\/FONT><FONT color=#000000> <\/FONT><FONT color=#808080>(<\/FONT><FONT color=#ff0000>&#8216;f&#8217;<\/FONT><FONT color=#808080>,<\/FONT><FONT color=#000000> 900<\/FONT><FONT color=#808080>));<\/P><\/FONT><\/FONT><FONT color=#0000ff><br \/>\n<P><FONT face=\"Courier New\">INSERT<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> <\/FONT><FONT color=#0000ff>INTO<\/FONT><FONT color=#000000> t1 <\/FONT><FONT color=#0000ff>VALUES<\/FONT><FONT color=#000000> <\/FONT><FONT color=#808080>(<\/FONT><FONT color=#000000>7<\/FONT><FONT color=#808080>,<\/FONT><FONT color=#000000> <\/FONT><FONT color=#ff00ff>REPLICATE<\/FONT><FONT color=#000000> <\/FONT><FONT color=#808080>(<\/FONT><FONT color=#ff0000>&#8216;g&#8217;<\/FONT><FONT color=#808080>,<\/FONT><FONT color=#000000> 900<\/FONT><FONT color=#808080>));<\/P><\/FONT><\/FONT><FONT color=#0000ff><br \/>\n<P><FONT face=\"Courier New\">INSERT<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> <\/FONT><FONT color=#0000ff>INTO<\/FONT><FONT color=#000000> t1 <\/FONT><FONT color=#0000ff>VALUES<\/FONT><FONT color=#000000> <\/FONT><FONT color=#808080>(<\/FONT><FONT color=#000000>8<\/FONT><FONT color=#808080>,<\/FONT><FONT color=#000000> <\/FONT><FONT color=#ff00ff>REPLICATE<\/FONT><FONT color=#000000> <\/FONT><FONT color=#808080>(<\/FONT><FONT color=#ff0000>&#8216;h&#8217;<\/FONT><FONT color=#808080>,<\/FONT><FONT color=#000000> 900<\/FONT><FONT color=#808080>));<\/P><\/FONT><\/FONT><FONT color=#0000ff><br \/>\n<P><FONT face=\"Courier New\">INSERT<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> <\/FONT><FONT color=#0000ff>INTO<\/FONT><FONT color=#000000> t1 <\/FONT><FONT color=#0000ff>VALUES<\/FONT><FONT color=#000000> <\/FONT><FONT color=#808080>(<\/FONT><FONT color=#000000>9<\/FONT><FONT color=#808080>,<\/FONT><FONT color=#000000> <\/FONT><FONT color=#ff00ff>REPLICATE<\/FONT><FONT color=#000000> <\/FONT><FONT color=#808080>(<\/FONT><FONT color=#ff0000>&#8216;i&#8217;<\/FONT><FONT color=#808080>,<\/FONT><FONT color=#000000> 900<\/FONT><FONT color=#808080>));<\/P><\/FONT><\/FONT><FONT size=2><br \/>\n<P><FONT face=\"Courier New\">GO<\/FONT><\/P><\/BLOCKQUOTE><br \/>\n<P dir=ltr>I can find out what the first index page is using the DBCC IND command:<\/P><FONT color=#0000ff><br \/>\n<BLOCKQUOTE dir=ltr style=\"MARGIN-RIGHT: 0px\"><br \/>\n<P><FONT face=\"Courier New\">DBCC<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> IND <\/FONT><FONT color=#808080>(<\/FONT><FONT color=#ff0000>&#8216;pagesplittest&#8217;<\/FONT><FONT color=#808080>,<\/FONT><FONT color=#000000> <\/FONT><FONT color=#ff0000>&#8216;t1&#8217;<\/FONT><FONT color=#808080>,<\/FONT><FONT color=#000000> 1<\/FONT><FONT color=#808080>);<\/P><\/FONT><\/FONT><FONT size=2><br \/>\n<P><FONT face=\"Courier New\">GO<\/FONT><\/P><\/BLOCKQUOTE><br \/>\n<P>This command list all the pages that are allocated to an index. Here&#8217;s the output in this case:<\/P><br \/>\n<P><IMG height=59 alt=SEQA3.jpg src=\"https:\/\/www.sqlskills.com\/blogs\/paul\/content\/binary\/seqa3.jpg\" width=1093 border=0><\/P><br \/>\n<P minmax_bound=\"true\" mce_keep=\"true\"><SPAN style=\"FONT-SIZE: 10pt\">The columns mean:<\/SPAN><\/P><br \/>\n<UL><br \/>\n<LI><br \/>\n<DIV minmax_bound=\"true\" mce_keep=\"true\"><SPAN style=\"FONT-SIZE: 10pt\"><\/SPAN><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\">PageFID &#8211; the file ID of the page<\/SPAN><\/FONT><\/DIV><br \/>\n<LI><br \/>\n<DIV minmax_bound=\"true\" mce_keep=\"true\"><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\"><\/SPAN><\/FONT><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\">PagePID &#8211; the page number in the file<\/SPAN><\/FONT><\/DIV><br \/>\n<LI><br \/>\n<DIV minmax_bound=\"true\" mce_keep=\"true\"><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\"><\/SPAN><\/FONT><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\">IAMFID &#8211; the file ID of the IAM page that maps this page (this will be NULL for IAM pages themselves as they&#8217;re not self-referential)<\/SPAN><\/FONT><\/DIV><br \/>\n<LI><br \/>\n<DIV minmax_bound=\"true\" mce_keep=\"true\"><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\">IAMPID &#8211; the page number in the file of the IAM page that maps this page<\/SPAN><\/FONT><\/DIV><br \/>\n<LI><br \/>\n<DIV minmax_bound=\"true\" mce_keep=\"true\"><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\"><\/SPAN><\/FONT><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\">ObjectID &#8211; the ID of the object this page is part of<\/SPAN><\/FONT><\/DIV><br \/>\n<LI><br \/>\n<DIV minmax_bound=\"true\" mce_keep=\"true\"><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\"><\/SPAN><\/FONT><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\">IndexID &#8211; the ID of the index this page is part of<\/SPAN><\/FONT><\/DIV><br \/>\n<LI><br \/>\n<DIV minmax_bound=\"true\" mce_keep=\"true\"><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\">PartitionNumber &#8211; the partition number (as defined by the partitioning scheme for the index) of the partition this page is part of<\/SPAN><\/FONT><\/DIV><br \/>\n<LI><br \/>\n<DIV minmax_bound=\"true\" mce_keep=\"true\"><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\"><\/SPAN><\/FONT><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\">PartitionID &#8211; the internal ID of the partition this page is part of<\/SPAN><\/FONT><\/DIV><br \/>\n<LI><br \/>\n<DIV minmax_bound=\"true\" mce_keep=\"true\"><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\">iam_chain_type &#8211; see <a href=\"http:\/\/blogs.msdn.com\/b\/sqlserverstorageengine\/archive\/2006\/06\/25\/646865.aspx\" minmax_bound=\"true\" mce_href=\"https:\/\/blogs.msdn.com\/sqlserverstorageengine\/archive\/2006\/06\/25\/646865.aspx\">IAM chains and allocation units in SQL Server 2005<\/a><\/SPAN><\/FONT><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\"><\/SPAN><\/FONT><\/DIV><br \/>\n<LI><br \/>\n<DIV minmax_bound=\"true\" mce_keep=\"true\"><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\">PageType &#8211; the page type. Some common ones are:<\/SPAN><\/FONT><\/DIV><br \/>\n<UL><br \/>\n<LI><br \/>\n<DIV minmax_bound=\"true\" mce_keep=\"true\"><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\"><\/SPAN><\/FONT><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\">1 &#8211; data page<\/SPAN><\/FONT><\/DIV><br \/>\n<LI><br \/>\n<DIV minmax_bound=\"true\" mce_keep=\"true\"><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\"><\/SPAN><\/FONT><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\">2 &#8211; index page<\/SPAN><\/FONT><\/DIV><br \/>\n<LI><br \/>\n<DIV minmax_bound=\"true\" mce_keep=\"true\"><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\"><\/SPAN><\/FONT><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\">3 and 4 &#8211; text pages<\/SPAN><\/FONT><\/DIV><br \/>\n<LI><br \/>\n<DIV minmax_bound=\"true\" mce_keep=\"true\"><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\"><\/SPAN><\/FONT><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\">8 &#8211; GAM page<\/SPAN><\/FONT><\/DIV><br \/>\n<LI><br \/>\n<DIV minmax_bound=\"true\" mce_keep=\"true\"><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\"><\/SPAN><\/FONT><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\">9 &#8211; SGAM page<\/SPAN><\/FONT><\/DIV><br \/>\n<LI><br \/>\n<DIV minmax_bound=\"true\" mce_keep=\"true\"><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\"><\/SPAN><\/FONT><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\">10 &#8211; IAM page<\/SPAN><\/FONT><\/DIV><br \/>\n<LI><br \/>\n<DIV minmax_bound=\"true\" mce_keep=\"true\"><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\"><\/SPAN><\/FONT><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\">11 &#8211; PFS page<\/SPAN><\/FONT><\/DIV><\/LI><\/UL><br \/>\n<LI><br \/>\n<DIV minmax_bound=\"true\" mce_keep=\"true\"><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\"><\/SPAN><\/FONT><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\">IndexLevel &#8211; what level the page is at in the index (if at all). Remember that index levels go from 0 at the leaf to N at the root page (except in clustered indexes in SQL Server 2000 and 7.0 &#8211; where there&#8217;s a 0 at the leaf level (data pages) and a 0 at the next level up (first level of index pages))<\/SPAN><\/FONT><\/DIV><br \/>\n<LI><br \/>\n<DIV minmax_bound=\"true\" mce_keep=\"true\"><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\"><\/SPAN><\/FONT><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\">NextPageFID and NextPagePID &#8211; the page ID of the next page in the doubly-linked list of pages at this level of the index<\/SPAN><\/FONT><\/DIV><br \/>\n<LI><br \/>\n<DIV minmax_bound=\"true\" mce_keep=\"true\"><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\"><\/SPAN><\/FONT><FONT face=Verdana><SPAN style=\"FONT-SIZE: 10pt\">PrevPageFID and PrevPagePID &#8211; the page ID of the previous page in the doubly-linked list of pages at this level of the index<?xml:namespace prefix = o ns = \"urn:schemas-microsoft-com:office:office\" \/><o:p><\/o:p><\/SPAN><\/FONT><\/DIV><\/LI><\/UL><br \/>\n<P minmax_bound=\"true\" mce_keep=\"true\"><SPAN style=\"FONT-SIZE: 10pt\">So you can see we&#8217;ve got a single page clustered index with an IAM page. Note that the page IDs returned may differ on your server. Let&#8217;s look at the data page:<\/SPAN><\/P><FONT size=2><SPAN style=\"FONT-SIZE: 10pt\"><FONT color=#0000ff><br \/>\n<BLOCKQUOTE dir=ltr style=\"MARGIN-RIGHT: 0px\"><br \/>\n<P><FONT face=\"Courier New\">DBCC<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> TRACEON <\/FONT><FONT color=#808080>(<\/FONT><FONT color=#000000>3604<\/FONT><FONT color=#808080>);<\/P><\/FONT><\/FONT><FONT face=\"Courier New\"><br \/>\n<P>GO<\/P><\/FONT><FONT color=#0000ff><br \/>\n<P><FONT face=\"Courier New\">DBCC<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> PAGE <\/FONT><FONT color=#808080>(<\/FONT><FONT color=#000000>pagesplittest<\/FONT><FONT color=#808080>,<\/FONT><FONT color=#000000> 1<\/FONT><FONT color=#808080>,<\/FONT><FONT color=#000000> 143<\/FONT><FONT color=#808080>,<\/FONT><FONT color=#000000> 3<\/FONT><FONT color=#808080>);<\/P><\/FONT><\/FONT><FONT size=2><br \/>\n<P><FONT face=\"Courier New\">GO<\/FONT><\/P><\/BLOCKQUOTE><br \/>\n<P dir=ltr>The traceflag is to make the output of DBCC PAGE go to the console, rather than to the error log. The syntax for DBCC PAGE is:<\/P><br \/>\n<BLOCKQUOTE dir=ltr style=\"MARGIN-RIGHT: 0px\"><br \/>\n<P dir=ltr><FONT face=\"Courier New\" minmax_bound=\"true\"><SPAN style=\"FONT-SIZE: 12pt; FONT-FAMILY: 'Courier New'\"><FONT size=2>dbcc page ( {&#8216;dbname&#8217; | dbid}, filenum, pagenum [, printopt={0|1|2|3} ])<o:p><\/o:p><\/FONT><\/SPAN><\/FONT><\/P><\/BLOCKQUOTE><br \/>\n<P minmax_bound=\"true\"><FONT size=2 minmax_bound=\"true\"><SPAN style=\"FONT-SIZE: 12pt\"><FONT size=2>The filenum and pagenum parameters are taken from the page IDs that come from various system tables and appear in DBCC or other system error messages. A page ID<\/FONT> <FONT size=2>of, say, (1:143) has filenum = 1 and pagenum = 143.<\/FONT><\/SPAN><\/FONT><\/P><br \/>\n<P minmax_bound=\"true\"><FONT size=2 minmax_bound=\"true\"><SPAN style=\"FONT-SIZE: 12pt\"><FONT size=2>The printopt parameter has the following meanings:<\/FONT><\/SPAN><\/FONT><\/P><br \/>\n<UL><br \/>\n<LI><br \/>\n<DIV minmax_bound=\"true\"><FONT size=2 minmax_bound=\"true\"><SPAN style=\"FONT-SIZE: 12pt\"><\/SPAN><\/FONT>0 &#8211; print just the page header<\/DIV><br \/>\n<LI><br \/>\n<DIV minmax_bound=\"true\"><FONT face=Verdana>1 &#8211; page header plus per-row hex dumps and a dump of the page slot array (unless its a page that doesn&#8217;t have one, like allocation bitmaps)<SPAN style=\"FONT-FAMILY: 'Courier New'\"> <\/SPAN><\/FONT><\/DIV><br \/>\n<LI><br \/>\n<DIV minmax_bound=\"true\"><FONT face=Verdana><SPAN style=\"FONT-FAMILY: 'Courier New'\"><\/SPAN><\/FONT><FONT face=Verdana>2 &#8211; page header plus whole page hex dump<\/FONT><\/DIV><br \/>\n<LI><br \/>\n<DIV minmax_bound=\"true\"><FONT face=Verdana>3 &#8211; page header plus detailed per-row interpretation<\/FONT><\/DIV><\/LI><\/UL><br \/>\n<P minmax_bound=\"true\"><FONT face=Verdana>The per-row interpretation works for all page types, including the allocation bitmaps. In our case, we asked for a detailed output. I&#8217;ll explain the various parts of the output in a post about the anatomy of a page. Here&#8217;s the output from DBCC PAGE, with a bunch of the repeated&nbsp;per-row info&nbsp;removed for brevity:<\/FONT><\/P><br \/>\n<BLOCKQUOTE dir=ltr style=\"MARGIN-RIGHT: 0px\"><br \/>\n<P minmax_bound=\"true\"><FONT face=\"Courier New\">PAGE: (1:143)<\/FONT><\/P><br \/>\n<P minmax_bound=\"true\"><BR><FONT face=\"Courier New\">BUFFER:<\/FONT><\/P><br \/>\n<P minmax_bound=\"true\"><BR><FONT face=\"Courier New\">BUF @0x02C49720<\/FONT><\/P><br \/>\n<P minmax_bound=\"true\"><FONT face=\"Courier New\">bpage = 0x05400000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bhash = 0x00000000&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bpageno = (1:143)<BR>bdbid = 8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; breferences = 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bUse1 = 22163<BR>bstat = 0xc0010b&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; blog = 0x32159bb&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bnext = 0x00000000<\/FONT><\/P><br \/>\n<P minmax_bound=\"true\"><FONT face=\"Courier New\">PAGE HEADER:<\/FONT><\/P><br \/>\n<P minmax_bound=\"true\"><BR><FONT face=\"Courier New\">Page @0x05400000<\/FONT><\/P><br \/>\n<P minmax_bound=\"true\"><FONT face=\"Courier New\">m_pageId = (1:143)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_headerVersion = 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_type = 1<BR>m_typeFlagBits = 0x4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_level = 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_flagBits = 0x8000<BR>m_objId (AllocUnitId.idObj) = 68&nbsp;&nbsp;&nbsp;&nbsp; m_indexId (AllocUnitId.idInd) = 256&nbsp; <BR>Metadata: AllocUnitId = 72057594042384384&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>Metadata: PartitionId = 72057594038386688&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Metadata: IndexId = 1<BR>Metadata: ObjectId = 2073058421&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_prevPage = (0:0)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_nextPage = (0:0)<BR>pminlen = 8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_slotCnt = 8&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_freeCnt = 744<BR>m_freeData = 7432&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_reservedCnt = 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_lsn = (18:113:2)<BR>m_xactReserved = 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_xdesId = (0:0)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_ghostRecCnt = 0<BR>m_tornBits = 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/FONT><\/P><br \/>\n<P minmax_bound=\"true\"><FONT face=\"Courier New\">Allocation Status<\/FONT><\/P><br \/>\n<P minmax_bound=\"true\"><FONT face=\"Courier New\">GAM (1:2) = ALLOCATED&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SGAM (1:3) = ALLOCATED&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>PFS (1:1) = 0x60 MIXED_EXT ALLOCATED&nbsp;&nbsp; 0_PCT_FULL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DIFF (1:6) = CHANGED<BR>ML (1:7) = NOT MIN_LOGGED&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/FONT><\/P><br \/>\n<P minmax_bound=\"true\"><FONT face=\"Courier New\">Slot 0 Offset 0x60 Length 917<\/FONT><\/P><br \/>\n<P minmax_bound=\"true\"><FONT face=\"Courier New\">Record Type = PRIMARY_RECORD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Record Attributes =&nbsp; NULL_BITMAP VARIABLE_COLUMNS<\/FONT><\/P><br \/>\n<P minmax_bound=\"true\"><FONT face=\"Courier New\">Memory Dump @0x5C24C060<\/FONT><\/P><br \/>\n<P minmax_bound=\"true\"><FONT face=\"Courier New\">00000000:&nbsp;&nbsp; 30000800 01000000 0300f802 00110095 \u20200&#8230;&#8230;&#8230;&#8230;&#8230;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>00000010:&nbsp;&nbsp; 03616161 61616161 61616161 61616161 \u2020.aaaaaaaaaaaaaaa&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/FONT><\/P><br \/>\n<P minmax_bound=\"true\"><FONT face=\"Courier New\">&lt;snip&gt; I&#8217;ve removed this section to save space<\/FONT><\/P><br \/>\n<P minmax_bound=\"true\"><FONT face=\"Courier New\">00000380:&nbsp;&nbsp; 61616161 61616161 61616161 61616161 \u2020aaaaaaaaaaaaaaaa&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>00000390:&nbsp;&nbsp; 61616161 61\u2020\u2020\u2020\u2020\u2020\u2020\u2020\u2020\u2020\u2020\u2020\u2020\u2020\u2020\u2020\u2020\u2020\u2020\u2020\u2020\u2020\u2020\u2020\u2020\u2020\u2020aaaaa&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>UNIQUIFIER = [NULL]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/FONT><\/P><br \/>\n<P minmax_bound=\"true\"><FONT face=\"Courier New\">Slot 0 Column 1 Offset 0x4 Length 4<\/FONT><\/P><br \/>\n<P minmax_bound=\"true\"><FONT face=\"Courier New\">c1 = 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/FONT><\/P><br \/>\n<P minmax_bound=\"true\"><FONT face=\"Courier New\">Slot 0 Column 2 Offset 0x11 Length 900<\/FONT><\/P><br \/>\n<P minmax_bound=\"true\"><FONT face=\"Courier New\">c2 = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<BR>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<BR>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<BR>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<BR>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<BR>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<BR>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<BR>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa<BR>a&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/FONT><\/P><br \/>\n<P minmax_bound=\"true\"><FONT face=\"Courier New\">Slot 1 Offset 0x3f5 Length 917<\/FONT><\/P><br \/>\n<P minmax_bound=\"true\"><FONT face=\"Courier New\">Record Type = PRIMARY_RECORD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Record Attributes =&nbsp; NULL_BITMAP VARIABLE_COLUMNS<\/FONT><\/P><br \/>\n<P minmax_bound=\"true\"><FONT face=\"Courier New\">Memory Dump @0x5C24C3F5<\/FONT><\/P><br \/>\n<P minmax_bound=\"true\"><FONT face=\"Courier New\">&lt;snip&gt; And again&#8230;<\/FONT><\/P><br \/>\n<P minmax_bound=\"true\"><FONT face=\"Courier New\">DBCC execution completed. If DBCC printed error messages, contact your system administrator.<\/FONT><\/FONT><\/SPAN><\/FONT><\/FONT><\/FONT><\/FONT><\/FONT><\/FONT><\/P><\/BLOCKQUOTE><FONT face=Verdana><FONT size=2><br \/>\n<P>As you can see from the output, each row is 917 bytes long and there&#8217;s only 744 bytes free (look at the m_freecnt value in the PAGE HEADER section). This means that we can&#8217;t insert another row on that page of the same length &#8211; there just isn&#8217;t space &#8211; but that&#8217;s what we&#8217;re going to do! Remember that this page currently has nine rows on it. Let&#8217;s force a page split:<\/P><FONT color=#0000ff><br \/>\n<BLOCKQUOTE dir=ltr style=\"MARGIN-RIGHT: 0px\"><br \/>\n<P><FONT face=\"Courier New\">BEGIN<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> <\/FONT><FONT color=#0000ff>TRAN<\/FONT><FONT color=#808080>;<\/P><\/FONT><\/FONT><FONT face=\"Courier New\"><br \/>\n<P>GO<\/P><\/FONT><FONT color=#0000ff><br \/>\n<P><FONT face=\"Courier New\">INSERT<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> <\/FONT><FONT color=#0000ff>INTO<\/FONT><FONT color=#000000> t1 <\/FONT><FONT color=#0000ff>VALUES<\/FONT><FONT color=#000000> <\/FONT><FONT color=#808080>(<\/FONT><FONT color=#000000>5<\/FONT><FONT color=#808080>,<\/FONT><FONT color=#000000> <\/FONT><FONT color=#ff00ff>REPLICATE<\/FONT><FONT color=#000000> <\/FONT><FONT color=#808080>(<\/FONT><FONT color=#ff0000>&#8216;a&#8217;<\/FONT><FONT color=#808080>,<\/FONT><FONT color=#000000> 900<\/FONT><FONT color=#808080>));<\/P><\/FONT><\/FONT><br \/>\n<P><FONT face=\"Courier New\">GO<\/FONT><\/P><\/BLOCKQUOTE><br \/>\n<P dir=ltr>Now we know there wasn&#8217;t enough room so the page must have split. Let&#8217;s check DBCC IND again to see if another page was allocated to the index &#8211; here&#8217;s the output:<\/P><br \/>\n<P dir=ltr><IMG height=96 alt=SEQA41.jpg src=\"https:\/\/www.sqlskills.com\/blogs\/paul\/content\/binary\/seqa41.jpg\" width=1095 border=0><\/P><br \/>\n<P dir=ltr>Two pages have been added &#8211; an index page and another data page. Before we added the extra row and caused the page split, the index only needed one page. Now that there are two data pages, there needs to be an index page to allow searches through the index b-tree. Let&#8217;s take a look at the two data pages to see which rows are stored on which page. Doing DBCC PAGE on them shows that page (1:143) has 5 rows, with c1 values 1 through 5, and page (1:154) has the 4 rows with c1 values 6 through 9 (I&#8217;m not going to post all the DBCC PAGE output &#8211; that would make the post way too long and it gives you an incentive to try the commands out). This is what we&#8217;d expect, as the page split occurs at the insertion point, and the row being inserted is put onto the page that split.<\/P><br \/>\n<P dir=ltr>Now let&#8217;s rollback the user transaction and see what happens:<\/P><FONT color=#0000ff><br \/>\n<BLOCKQUOTE dir=ltr style=\"MARGIN-RIGHT: 0px\"><br \/>\n<P><FONT face=\"Courier New\">ROLLBACK<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> <\/FONT><FONT color=#0000ff>TRAN<\/FONT><FONT color=#808080>;<\/P><\/FONT><\/FONT><br \/>\n<P><FONT face=\"Courier New\">GO<\/FONT><\/P><\/BLOCKQUOTE><br \/>\n<P dir=ltr>Running the DBCC PAGE commands again shows that the index structure remains the same as after the split. Page (1:154) has the 4 rows on it from the split and page (1:143) has the other rows but not the one we inserted in the explicit transaction.<\/P><br \/>\n<P dir=ltr>So, proof that a page split is never rolled back. I&#8217;ll be making much more use of these two DBCC commands in future posts and I&#8217;ll do the page anatomy one later this week. Let me know if there&#8217;s anything in particular you&#8217;d like to see described in this series.<\/P><\/FONT><\/FONT><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Time for the first post in the Inside the Storage Engine series. I&#8217;m going to focus on SQL Server 2005 in this series and I&#8217;ll point out major differences between 2005 and previous versions. Please drop me a line if there&#8217;s something you&#8217;d like to see explained and demo&#8217;d. Before jumping into how things work, [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34,38,48,62,96,100],"tags":[],"class_list":["post-1177","post","type-post","status-publish","format-standard","hentry","category-dbcc","category-example-scripts","category-inside-the-storage-engine","category-on-disk-structures","category-trace-flags","category-undocumented-commands"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Inside the Storage Engine: Using DBCC PAGE and DBCC IND to find out if page splits ever roll back - 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\/inside-the-storage-engine-using-dbcc-page-and-dbcc-ind-to-find-out-if-page-splits-ever-roll-back\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Inside the Storage Engine: Using DBCC PAGE and DBCC IND to find out if page splits ever roll back - Paul S. Randal\" \/>\n<meta property=\"og:description\" content=\"Time for the first post in the Inside the Storage Engine series. I&#8217;m going to focus on SQL Server 2005 in this series and I&#8217;ll point out major differences between 2005 and previous versions. Please drop me a line if there&#8217;s something you&#8217;d like to see explained and demo&#8217;d. Before jumping into how things work, [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/paul\/inside-the-storage-engine-using-dbcc-page-and-dbcc-ind-to-find-out-if-page-splits-ever-roll-back\/\" \/>\n<meta property=\"og:site_name\" content=\"Paul S. Randal\" \/>\n<meta property=\"article:published_time\" content=\"2007-10-01T01:53:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-01-02T03:36:51+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=\"11 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\/inside-the-storage-engine-using-dbcc-page-and-dbcc-ind-to-find-out-if-page-splits-ever-roll-back\/\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/inside-the-storage-engine-using-dbcc-page-and-dbcc-ind-to-find-out-if-page-splits-ever-roll-back\/\",\"name\":\"Inside the Storage Engine: Using DBCC PAGE and DBCC IND to find out if page splits ever roll back - Paul S. Randal\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#website\"},\"datePublished\":\"2007-10-01T01:53:53+00:00\",\"dateModified\":\"2013-01-02T03:36:51+00:00\",\"author\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/inside-the-storage-engine-using-dbcc-page-and-dbcc-ind-to-find-out-if-page-splits-ever-roll-back\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlskills.com\/blogs\/paul\/inside-the-storage-engine-using-dbcc-page-and-dbcc-ind-to-find-out-if-page-splits-ever-roll-back\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/inside-the-storage-engine-using-dbcc-page-and-dbcc-ind-to-find-out-if-page-splits-ever-roll-back\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Inside the Storage Engine: Using DBCC PAGE and DBCC IND to find out if page splits ever roll back\"}]},{\"@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":"Inside the Storage Engine: Using DBCC PAGE and DBCC IND to find out if page splits ever roll back - 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\/inside-the-storage-engine-using-dbcc-page-and-dbcc-ind-to-find-out-if-page-splits-ever-roll-back\/","og_locale":"en_US","og_type":"article","og_title":"Inside the Storage Engine: Using DBCC PAGE and DBCC IND to find out if page splits ever roll back - Paul S. Randal","og_description":"Time for the first post in the Inside the Storage Engine series. I&#8217;m going to focus on SQL Server 2005 in this series and I&#8217;ll point out major differences between 2005 and previous versions. Please drop me a line if there&#8217;s something you&#8217;d like to see explained and demo&#8217;d. Before jumping into how things work, [&hellip;]","og_url":"https:\/\/www.sqlskills.com\/blogs\/paul\/inside-the-storage-engine-using-dbcc-page-and-dbcc-ind-to-find-out-if-page-splits-ever-roll-back\/","og_site_name":"Paul S. Randal","article_published_time":"2007-10-01T01:53:53+00:00","article_modified_time":"2013-01-02T03:36:51+00:00","author":"Paul Randal","twitter_misc":{"Written by":"Paul Randal","Est. reading time":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/inside-the-storage-engine-using-dbcc-page-and-dbcc-ind-to-find-out-if-page-splits-ever-roll-back\/","url":"https:\/\/www.sqlskills.com\/blogs\/paul\/inside-the-storage-engine-using-dbcc-page-and-dbcc-ind-to-find-out-if-page-splits-ever-roll-back\/","name":"Inside the Storage Engine: Using DBCC PAGE and DBCC IND to find out if page splits ever roll back - Paul S. Randal","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#website"},"datePublished":"2007-10-01T01:53:53+00:00","dateModified":"2013-01-02T03:36:51+00:00","author":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce"},"breadcrumb":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/inside-the-storage-engine-using-dbcc-page-and-dbcc-ind-to-find-out-if-page-splits-ever-roll-back\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/paul\/inside-the-storage-engine-using-dbcc-page-and-dbcc-ind-to-find-out-if-page-splits-ever-roll-back\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/inside-the-storage-engine-using-dbcc-page-and-dbcc-ind-to-find-out-if-page-splits-ever-roll-back\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/paul\/"},{"@type":"ListItem","position":2,"name":"Inside the Storage Engine: Using DBCC PAGE and DBCC IND to find out if page splits ever roll back"}]},{"@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\/1177","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=1177"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts\/1177\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/media?parent=1177"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/categories?post=1177"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/tags?post=1177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}