{"id":895,"date":"2009-04-15T23:54:00","date_gmt":"2009-04-15T23:54:00","guid":{"rendered":"\/blogs\/paul\/post\/SQL-2005-SP2-maintenance-plan-bug-masking-corruption.aspx"},"modified":"2017-04-13T11:41:31","modified_gmt":"2017-04-13T18:41:31","slug":"sql-2005-sp2-maintenance-plan-bug-masking-corruption","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/paul\/sql-2005-sp2-maintenance-plan-bug-masking-corruption\/","title":{"rendered":"SQL 2005 SP2 maintenance plan bug masking corruption"},"content":{"rendered":"<p>\n<font face=\"verdana,geneva\" size=\"2\">Not much to do here in Tokyo while waiting for the Bangkok flight except read and blog, and I&#39;ve already done enough reading for one day on the flight here &#8211; so that leaves blogging!<\/font>\n<\/p>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">Here&#39;s an interesting case that I got involved in on <a href=\"http:\/\/www.sqlservercentral.com\/\">SQLServerCentral<\/a> (here&#39;s the <\/font><a href=\"http:\/\/www.sqlservercentral.com\/Forums\/Topic695886-266-1.aspx\"><font face=\"verdana,geneva\" size=\"2\">original thread<\/font><\/a><font face=\"verdana,geneva\" size=\"2\">, linked here with permission of the original poster). The problem was that every night the maintenance job would run and end up producing a stack dump, from a 211 error (which always indicates metadata corruption causing the Engine to trip over). I guessed system table corruption but the consistency checking portion of the maintenance job was apparently running fine. So I asked for one of the stack dumps, the output from the maintenance plan, and the latest SQL error log to have a look at (I have a weakness for these things, as you well know).<\/font>\n<\/p>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">After having a look, I saw some strange behavior in the error log &#8211; every night there 10 or so <font face=\"courier new,courier\">DBCC CHECKDB<\/font>s of master within about 2 minutes &#8211; corresponding to the consistency checking part of the maintenance job that was clearing running <font face=\"courier new,courier\">DBCC CHECKDB<\/font> against all the system and user databases. Then I remembered that vanilla 2005 SP2 has two nasty maintenance plan bugs &#8211; one of which caused the consistency checking part of the maintenance plan to malfunction when run, and run <font face=\"courier new,courier\">DBCC CHECKDB<\/font> against master every time instead of the database specified. Fixing that would then lead to the being able to properly run consistency checks and find the corrupt database.<\/font>\n<\/p>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">So &#8211; moral of the story is to make sure you&#39;re not running vanilla 2005 SP2 (or one of the builds close to it,&nbsp;3150 to 3158) otherwise you could get into problems with maintenance plans &#8211; worse still, you may think you&#39;ve been running consistency checks all this time on your user databases, but if no-one&#39;s checking the SQL error logs, you could just be repeatedly consistency checking master.<\/font>\n<\/p>\n<p>\n<font face=\"verdana,geneva\" size=\"2\">The KB that describes the bug is 934459 (available at <\/font><a href=\"https:\/\/support.microsoft.com\/en-us\/help\/934459\"><font face=\"verdana,geneva\" size=\"2\">http:\/\/support.microsoft.com\/kb\/934459<\/font><\/a><font face=\"verdana,geneva\" size=\"2\">), or you can install SP3 (available at <\/font><a href=\"https:\/\/support.microsoft.com\/en-us\/help\/955706\/list-of-the-bugs-that-are-fixed-in-sql-server-2005-service-pack-3\"><font face=\"verdana,geneva\" size=\"2\">http:\/\/support.microsoft.com\/?kbid=955706<\/font><\/a><font face=\"verdana,geneva\" size=\"2\">).<\/font><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Not much to do here in Tokyo while waiting for the Bangkok flight except read and blog, and I&#39;ve already done enough reading for one day on the flight here &#8211; so that leaves blogging! Here&#39;s an interesting case that I got involved in on SQLServerCentral (here&#39;s the original thread, linked here with permission 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":[19,30,31,52,85,95],"tags":[],"class_list":["post-895","post","type-post","status-publish","format-standard","hentry","category-bugfixes","category-corruption","category-database-maintenance","category-involuntary-dba","category-sql-agent","category-tools"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SQL 2005 SP2 maintenance plan bug masking corruption - 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\/sql-2005-sp2-maintenance-plan-bug-masking-corruption\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL 2005 SP2 maintenance plan bug masking corruption - Paul S. Randal\" \/>\n<meta property=\"og:description\" content=\"Not much to do here in Tokyo while waiting for the Bangkok flight except read and blog, and I&#039;ve already done enough reading for one day on the flight here &#8211; so that leaves blogging! Here&#039;s an interesting case that I got involved in on SQLServerCentral (here&#039;s the original thread, linked here with permission of [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/paul\/sql-2005-sp2-maintenance-plan-bug-masking-corruption\/\" \/>\n<meta property=\"og:site_name\" content=\"Paul S. Randal\" \/>\n<meta property=\"article:published_time\" content=\"2009-04-15T23:54:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-04-13T18:41:31+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=\"2 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\/sql-2005-sp2-maintenance-plan-bug-masking-corruption\/\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/sql-2005-sp2-maintenance-plan-bug-masking-corruption\/\",\"name\":\"SQL 2005 SP2 maintenance plan bug masking corruption - Paul S. Randal\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#website\"},\"datePublished\":\"2009-04-15T23:54:00+00:00\",\"dateModified\":\"2017-04-13T18:41:31+00:00\",\"author\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/sql-2005-sp2-maintenance-plan-bug-masking-corruption\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlskills.com\/blogs\/paul\/sql-2005-sp2-maintenance-plan-bug-masking-corruption\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/sql-2005-sp2-maintenance-plan-bug-masking-corruption\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL 2005 SP2 maintenance plan bug masking corruption\"}]},{\"@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":"SQL 2005 SP2 maintenance plan bug masking corruption - 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\/sql-2005-sp2-maintenance-plan-bug-masking-corruption\/","og_locale":"en_US","og_type":"article","og_title":"SQL 2005 SP2 maintenance plan bug masking corruption - Paul S. Randal","og_description":"Not much to do here in Tokyo while waiting for the Bangkok flight except read and blog, and I&#39;ve already done enough reading for one day on the flight here &#8211; so that leaves blogging! Here&#39;s an interesting case that I got involved in on SQLServerCentral (here&#39;s the original thread, linked here with permission of [&hellip;]","og_url":"https:\/\/www.sqlskills.com\/blogs\/paul\/sql-2005-sp2-maintenance-plan-bug-masking-corruption\/","og_site_name":"Paul S. Randal","article_published_time":"2009-04-15T23:54:00+00:00","article_modified_time":"2017-04-13T18:41:31+00:00","author":"Paul Randal","twitter_misc":{"Written by":"Paul Randal","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/sql-2005-sp2-maintenance-plan-bug-masking-corruption\/","url":"https:\/\/www.sqlskills.com\/blogs\/paul\/sql-2005-sp2-maintenance-plan-bug-masking-corruption\/","name":"SQL 2005 SP2 maintenance plan bug masking corruption - Paul S. Randal","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#website"},"datePublished":"2009-04-15T23:54:00+00:00","dateModified":"2017-04-13T18:41:31+00:00","author":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce"},"breadcrumb":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/sql-2005-sp2-maintenance-plan-bug-masking-corruption\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/paul\/sql-2005-sp2-maintenance-plan-bug-masking-corruption\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/sql-2005-sp2-maintenance-plan-bug-masking-corruption\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/paul\/"},{"@type":"ListItem","position":2,"name":"SQL 2005 SP2 maintenance plan bug masking corruption"}]},{"@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\/895","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=895"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts\/895\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/media?parent=895"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/categories?post=895"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/tags?post=895"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}