{"id":1066,"date":"2008-03-21T23:23:07","date_gmt":"2008-03-21T23:23:07","guid":{"rendered":"\/blogs\/paul\/post\/Inside-The-Storage-Engine-Does-turning-on-page-checksums-discard-any-torn-page-protection.aspx"},"modified":"2008-03-21T23:23:07","modified_gmt":"2008-03-21T23:23:07","slug":"inside-the-storage-engine-does-turning-on-page-checksums-discard-any-torn-page-protection","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/paul\/inside-the-storage-engine-does-turning-on-page-checksums-discard-any-torn-page-protection\/","title":{"rendered":"Inside The Storage Engine: Does turning on page checksums discard any torn-page protection?"},"content":{"rendered":"<p><FONT face=Verdana size=2><br \/>\n<P>This is a really interesting question that came up in the Microsoft Certified Architect class I&#8217;m teaching at present &#8211; if a database has torn-page protection enabled, and page checksums are enabled, is all the existing torn-page detection lost?<\/P><br \/>\n<P>This is an important question, because enabling page checksums doesn&#8217;t suddenly make all allocated pages be protected by page checksums (it&#8217;s not until a page is read into the buffer pool, modified, and then written back to disk, that it gets a page checksum). If all the existing torn-page protection is discarded when page checksums are enabled, then the pages would be unprotected until they got page checksums on. I couldn&#8217;t remember the answer, so I experimented!<\/P><br \/>\n<P>My idea was to create a database with torn-page protection, create a table with a simulated torn-page in it, then enable page checksums and see if the torn-page was still reported.<\/P><br \/>\n<BLOCKQUOTE dir=ltr style=\"MARGIN-RIGHT: 0px\"><FONT face=\"Courier New\" color=#008000 size=2><br \/>\n<P>&#8212; Create the test database<BR><\/FONT><FONT color=#0000ff><FONT face=\"Courier New\">USE<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> <\/FONT><FONT color=#0000ff>master<\/FONT><FONT color=#808080>;<BR><\/FONT><\/FONT><FONT face=\"Courier New\">GO<BR><\/FONT><FONT color=#0000ff><FONT face=\"Courier New\">CREATE<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> <\/FONT><FONT color=#0000ff>DATABASE<\/FONT><FONT color=#000000> ChecksumTest<\/FONT><FONT color=#808080>;<BR><\/FONT><\/FONT><FONT face=\"Courier New\">GO<BR><\/FONT><FONT color=#0000ff><FONT face=\"Courier New\">USE<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> ChecksumTest<\/FONT><FONT color=#808080>;<BR><\/FONT><\/FONT><FONT face=\"Courier New\">GO<\/FONT><\/P><FONT face=\"Courier New\" color=#008000><br \/>\n<P>&#8212; Explicitly set the database to have torn-page detection<BR><\/FONT><FONT color=#0000ff><FONT face=\"Courier New\">ALTER<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> <\/FONT><FONT color=#0000ff>DATABASE<\/FONT><FONT color=#000000> ChecksumTest <\/FONT><FONT color=#0000ff>SET<\/FONT><FONT color=#000000> <\/FONT><FONT color=#0000ff>PAGE_VERIFY<\/FONT><FONT color=#000000> <\/FONT><FONT color=#0000ff>TORN_PAGE_DETECTION<\/FONT><FONT color=#808080>;<BR><\/FONT><\/FONT><FONT face=\"Courier New\">GO<\/FONT><\/P><FONT face=\"Courier New\" color=#008000><br \/>\n<P>&#8212; Create a test table and insert a row.<BR><\/FONT><FONT color=#0000ff><FONT face=\"Courier New\">CREATE<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> <\/FONT><FONT color=#0000ff>TABLE<\/FONT><FONT color=#000000> BrokenTable <\/FONT><FONT color=#808080>(<\/FONT><\/FONT><FONT face=\"Courier New\">c1 <FONT color=#0000ff>INT<\/FONT><FONT color=#808080>,<\/FONT> c2 <FONT color=#0000ff>CHAR<\/FONT> <FONT color=#808080>(<\/FONT>1000<FONT color=#808080>));<BR><\/FONT><\/FONT><FONT color=#0000ff><FONT face=\"Courier New\">INSERT<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> <\/FONT><FONT color=#0000ff>INTO<\/FONT><FONT color=#000000> BrokenTable<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#0000ff>&nbsp;VALUES<\/FONT> <FONT color=#808080>(<\/FONT>1<FONT color=#808080>,<\/FONT> <FONT color=#ff0000>&#8216;a&#8217;<\/FONT><FONT color=#808080>);<BR><\/FONT><\/FONT><FONT face=\"Courier New\">GO<\/FONT><\/P><FONT face=\"Courier New\" color=#008000><br \/>\n<P>&#8212; Ensure the page is written to disk and then tossed from the buffer pool<BR><\/FONT><FONT color=#0000ff><FONT face=\"Courier New\">CHECKPOINT<\/FONT><\/FONT><FONT color=#808080><FONT face=\"Courier New\">;<BR><\/FONT><\/FONT><FONT face=\"Courier New\">GO<BR><\/FONT><FONT color=#0000ff><FONT face=\"Courier New\">DBCC<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> DROPCLEANBUFFERS<\/FONT><FONT color=#808080>;<BR><\/FONT><\/FONT><FONT face=\"Courier New\" size=2>GO<\/FONT><\/P><\/BLOCKQUOTE><br \/>\n<P dir=ltr><FONT face=\"Courier New\" size=2><FONT face=Verdana>Now I&#8217;m going to examine the page. There are two bits in the page header that specify whether the page is protected by torn-page detection or with a page checksum. Specifically, the <EM><STRONG>m_flagBits<\/STRONG><\/EM> field will have 0x100 set if the page is encoded for torn-page protection, and 0x200 set if the page has a page-checksum stored on it, and the page has not been modified (i.e. the checksum is stillvalid). You should not see the 0x100 bit set as torn-page encoding is removed when the page is read into the buffer pool &#8211; UNLESS the page IS actually torn, in which case the encoding is NOT removed.<\/FONT><\/FONT><\/P><br \/>\n<BLOCKQUOTE dir=ltr style=\"MARGIN-RIGHT: 0px\"><FONT size=5><br \/>\n<P><\/FONT><FONT size=2><FONT face=\"Courier New\">sp_allocationmetadata <FONT color=#ff0000>&#8216;BrokenTable&#8217;<\/FONT><FONT color=#808080>;<BR><\/FONT><\/FONT><\/FONT><FONT face=\"Courier New\">GO<BR><\/FONT><FONT color=#0000ff><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>);<BR><\/FONT><\/FONT><FONT face=\"Courier New\">GO<BR><\/FONT><FONT color=#0000ff><FONT face=\"Courier New\">DBCC<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> PAGE <\/FONT><FONT color=#808080>(<\/FONT><FONT color=#ff0000>&#8216;ChecksumTest&#8217;<\/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>);<BR><\/FONT><\/FONT><FONT face=\"Courier New\">GO<\/FONT><\/P><br \/>\n<P><FONT face=\"Courier New\">&lt;snip&gt;<\/FONT><\/P><br \/>\n<P><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; <STRONG>m_flagBits = 0x8000<\/STRONG><BR>m_objId (AllocUnitId.idObj) = 67&nbsp;&nbsp;&nbsp;&nbsp; m_indexId (AllocUnitId.idInd) = 256&nbsp; <BR>Metadata: AllocUnitId = 72057594042318848&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 = 72057594038321152&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 = 0<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 = 1008&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_slotCnt = 2&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 = 6070<BR>m_freeData = 2118&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 = (28:183: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><STRONG>m_tornBits = 770<\/STRONG><\/FONT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/P><br \/>\n<P><FONT face=\"Courier New\">&lt;snip&gt;<\/FONT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/P><\/BLOCKQUOTE><br \/>\n<P dir=ltr>In this case the torn-page&nbsp;encoding has been removed, and the page is fine. <FONT face=\"Courier New\"><FONT face=Verdana><FONT face=\"Courier New\" size=2><FONT size=4><FONT face=Verdana color=#000000 size=2><FONT face=\"Courier New\" size=2><FONT size=4><FONT size=5><FONT face=Verdana size=2>Once I&#8217;ve corrupted the&nbsp;page on disk, it&#8217;s tricky to be able to see it with DBCC PAGE. I managed to catch it once and saw the following:<\/FONT><\/FONT><\/FONT><\/FONT><\/FONT><\/P><br \/>\n<BLOCKQUOTE dir=ltr style=\"MARGIN-RIGHT: 0px\"><FONT size=2><br \/>\n<P>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; <STRONG>m_flagBits = 0x8100<\/STRONG><BR>m_objId (AllocUnitId.idObj) = 67&nbsp;&nbsp;&nbsp;&nbsp; m_indexId (AllocUnitId.idInd) = 256&nbsp; <BR>Metadata: AllocUnitId = 72057594042318848&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 = 72057594038321152&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 = 0<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 = 1008&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_slotCnt = 1&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 = 7083<BR>m_freeData = 1107&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 = (28:81:20)<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><STRONG>m_tornBits = 41949233<\/STRONG> <\/P><\/FONT><\/BLOCKQUOTE><br \/>\n<P dir=ltr><FONT face=Verdana color=#000000 size=2><FONT face=\"Courier New\" size=2><FONT size=4><FONT size=5><FONT face=Verdana size=2><FONT color=#003300>Now if I try to select from the table I get:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\/FONT><\/P><br \/>\n<BLOCKQUOTE dir=ltr style=\"MARGIN-RIGHT: 0px\"><FONT face=\"Courier New\"><FONT face=Verdana><FONT color=#0000ff size=5><br \/>\n<P><FONT face=\"Courier New\" size=2>SELECT<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT color=#000000> <\/FONT><FONT color=#808080>*<\/FONT><FONT color=#000000> <\/FONT><FONT color=#0000ff>FROM<\/FONT><FONT color=#000000> BrokenTable<\/FONT><FONT color=#808080>;<BR><\/FONT><\/FONT><FONT face=\"Courier New\" color=#003300 size=2>GO<\/FONT><\/P><FONT face=\"Courier New\" size=2><FONT size=4><br \/>\n<P><FONT color=#ff0000 size=2>Msg 824, Level 24, State 2, Line 1<\/FONT><\/P><br \/>\n<P><FONT color=#ff0000 size=2>SQL Server detected a logical consistency-based I\/O error: torn page (expected signature: 0xaaaaaaaa; actual signature: 0xaaaaa82a). It occurred during a read of page (1:143) in database ID 8 at offset 0x0000000011e000 in file &#8216;C:\\Program Files\\Microsoft SQL Server\\MSSQL.1\\MSSQL\\DATA\\ChecksumTest.mdf&#8217;. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.<\/FONT><\/P><\/BLOCKQUOTE><br \/>\n<P dir=ltr><FONT face=Verdana color=#000000 size=2>The crux of the question is whether this will still be reported if the database switches to page checksums &#8211; let&#8217;s try:<\/FONT><\/P><br \/>\n<BLOCKQUOTE dir=ltr style=\"MARGIN-RIGHT: 0px\"><FONT color=#0000ff size=5><br \/>\n<P><FONT size=2>ALTER<\/FONT><\/FONT><FONT size=2> <FONT color=#0000ff>DATABASE<\/FONT> checksumtest <FONT color=#0000ff>SET<\/FONT> <FONT color=#0000ff>PAGE_VERIFY<\/FONT> <FONT color=#0000ff>CHECKSUM<\/FONT><FONT color=#808080>;<BR><\/FONT><\/FONT><FONT size=2>GO<\/FONT><\/P><FONT face=\"Courier New\"><FONT face=Verdana><FONT color=#0000ff size=5><br \/>\n<P dir=ltr style=\"MARGIN-RIGHT: 0px\"><FONT face=\"Courier New\" size=2>SELECT<\/FONT><\/FONT><FONT face=\"Courier New\"><FONT size=2><FONT color=#000000> <\/FONT><FONT color=#808080>*<\/FONT><FONT color=#000000> <\/FONT><FONT color=#0000ff>FROM<\/FONT><FONT color=#000000> BrokenTable<\/FONT><\/FONT><FONT color=#808080 size=2>;<BR><\/FONT><\/FONT><FONT face=\"Courier New\" color=#003300 size=2>GO<\/FONT><\/P><FONT face=\"Courier New\" size=2><FONT size=4><br \/>\n<P dir=ltr style=\"MARGIN-RIGHT: 0px\"><FONT color=#ff0000 size=2>Msg 824, Level 24, State 2, Line 1<\/FONT><\/P><br \/>\n<P dir=ltr style=\"MARGIN-RIGHT: 0px\"><FONT color=#ff0000 size=2>SQL Server detected a logical consistency-based I\/O error: torn page (expected signature: 0xaaaaaaaa; actual signature: 0xaaaaa82a). It occurred during a read of page (1:143) in database ID 8 at offset 0x0000000011e000 in file &#8216;C:\\Program Files\\Microsoft SQL Server\\MSSQL.1\\MSSQL\\DATA\\ChecksumTest.mdf&#8217;. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.<\/FONT><\/P><\/BLOCKQUOTE><br \/>\n<P dir=ltr style=\"MARGIN-RIGHT: 0px\"><FONT face=Verdana color=#000000 size=2>Cool! The answer is YES &#8211; the torn-page is still detected, because the bit in the page header specifies which page protection algorithm the page is using. In fact, it even works if you turn off page checksums and torn-page detection completely.<\/FONT><\/P><\/FONT><\/FONT><\/FONT><\/FONT><\/FONT><\/FONT><\/FONT><\/FONT><\/FONT><\/FONT><\/FONT><\/FONT><\/FONT><\/FONT><\/FONT><\/FONT><\/FONT><\/FONT><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a really interesting question that came up in the Microsoft Certified Architect class I&#8217;m teaching at present &#8211; if a database has torn-page protection enabled, and page checksums are enabled, is all the existing torn-page detection lost? This is an important question, because enabling page checksums doesn&#8217;t suddenly make all allocated pages be [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30,48,53,62,63],"tags":[],"class_list":["post-1066","post","type-post","status-publish","format-standard","hentry","category-corruption","category-inside-the-storage-engine","category-io-subsystems","category-on-disk-structures","category-page-checksums"],"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: Does turning on page checksums discard any torn-page protection? - 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-does-turning-on-page-checksums-discard-any-torn-page-protection\/\" \/>\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: Does turning on page checksums discard any torn-page protection? - Paul S. Randal\" \/>\n<meta property=\"og:description\" content=\"This is a really interesting question that came up in the Microsoft Certified Architect class I&#8217;m teaching at present &#8211; if a database has torn-page protection enabled, and page checksums are enabled, is all the existing torn-page detection lost? This is an important question, because enabling page checksums doesn&#8217;t suddenly make all allocated pages be [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/paul\/inside-the-storage-engine-does-turning-on-page-checksums-discard-any-torn-page-protection\/\" \/>\n<meta property=\"og:site_name\" content=\"Paul S. Randal\" \/>\n<meta property=\"article:published_time\" content=\"2008-03-21T23:23:07+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=\"7 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-does-turning-on-page-checksums-discard-any-torn-page-protection\/\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/inside-the-storage-engine-does-turning-on-page-checksums-discard-any-torn-page-protection\/\",\"name\":\"Inside The Storage Engine: Does turning on page checksums discard any torn-page protection? - Paul S. Randal\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#website\"},\"datePublished\":\"2008-03-21T23:23:07+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-does-turning-on-page-checksums-discard-any-torn-page-protection\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlskills.com\/blogs\/paul\/inside-the-storage-engine-does-turning-on-page-checksums-discard-any-torn-page-protection\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/inside-the-storage-engine-does-turning-on-page-checksums-discard-any-torn-page-protection\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Inside The Storage Engine: Does turning on page checksums discard any torn-page protection?\"}]},{\"@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: Does turning on page checksums discard any torn-page protection? - 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-does-turning-on-page-checksums-discard-any-torn-page-protection\/","og_locale":"en_US","og_type":"article","og_title":"Inside The Storage Engine: Does turning on page checksums discard any torn-page protection? - Paul S. Randal","og_description":"This is a really interesting question that came up in the Microsoft Certified Architect class I&#8217;m teaching at present &#8211; if a database has torn-page protection enabled, and page checksums are enabled, is all the existing torn-page detection lost? This is an important question, because enabling page checksums doesn&#8217;t suddenly make all allocated pages be [&hellip;]","og_url":"https:\/\/www.sqlskills.com\/blogs\/paul\/inside-the-storage-engine-does-turning-on-page-checksums-discard-any-torn-page-protection\/","og_site_name":"Paul S. Randal","article_published_time":"2008-03-21T23:23:07+00:00","author":"Paul Randal","twitter_misc":{"Written by":"Paul Randal","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/inside-the-storage-engine-does-turning-on-page-checksums-discard-any-torn-page-protection\/","url":"https:\/\/www.sqlskills.com\/blogs\/paul\/inside-the-storage-engine-does-turning-on-page-checksums-discard-any-torn-page-protection\/","name":"Inside The Storage Engine: Does turning on page checksums discard any torn-page protection? - Paul S. Randal","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#website"},"datePublished":"2008-03-21T23:23:07+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-does-turning-on-page-checksums-discard-any-torn-page-protection\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/paul\/inside-the-storage-engine-does-turning-on-page-checksums-discard-any-torn-page-protection\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/inside-the-storage-engine-does-turning-on-page-checksums-discard-any-torn-page-protection\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/paul\/"},{"@type":"ListItem","position":2,"name":"Inside The Storage Engine: Does turning on page checksums discard any torn-page protection?"}]},{"@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\/1066","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=1066"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts\/1066\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/media?parent=1066"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/categories?post=1066"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/tags?post=1066"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}