{"id":831,"date":"2009-06-15T12:50:00","date_gmt":"2009-06-15T12:50:00","guid":{"rendered":"\/blogs\/paul\/post\/Issues-around-DBCC-CHECKDB-and-the-use-of-hidden-database-snapshots.aspx"},"modified":"2017-04-13T09:51:43","modified_gmt":"2017-04-13T16:51:43","slug":"issues-around-dbcc-checkdb-and-the-use-of-hidden-database-snapshots","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/paul\/issues-around-dbcc-checkdb-and-the-use-of-hidden-database-snapshots\/","title":{"rendered":"Issues around DBCC CHECKDB and the use of hidden database snapshots"},"content":{"rendered":"<p>There are a couple of\u00a0issues that I&#8217;ve heard of in the last few weeks\u00a0(one while onsite at a customer) and I think they might bite some people so I&#8217;d like to share them with you.<\/p>\n<p>DBCC CHECKDB in 2005 onwards uses a hidden database snapshot to create the transactionally-consistent point-in-time view of the database that it requires to run the consistency checks. The hidden database snapshot is created as a set of NTFS alternate streams on the existing database data files. The alternative to having DBCC CHECKDB do this automatically is to manually create your own database snapshot and run DBCC CHECKDB against that &#8211; it&#8217;s the same thing really.<\/p>\n<p><strong>[Edit 6\/19\/14: From SQL Server 2014 onward, the database snapshot is not hidden and does not use NTFS alternate streams.]<\/strong><\/p>\n<p>More info on DBCC CHECKDB&#8217;s use of snapshots, and potential problems can be found at:<\/p>\n<ul>\n<li>The first section of <a href=\"https:\/\/www.sqlskills.com\/blogs\/paul\/checkdb-from-every-angle-complete-description-of-all-checkdb-stages\/\">CHECKDB From Every Angle: Complete description of all CHECKDB stages<\/a><\/li>\n<li><a href=\"https:\/\/www.sqlskills.com\/blogs\/paul\/checkdb-from-every-angle-why-would-checkdb-run-out-of-space\/\">CHECKDB From Every Angle: Why would CHECKDB run out of space?<\/a><\/li>\n<li><a href=\"https:\/\/www.sqlskills.com\/blogs\/paul\/database-snapshots-when-things-go-wrong\/\">Database snapshots &#8211; when things go wrong<\/a><\/li>\n<\/ul>\n<p>The two issues that I&#8217;ve heard of both are around an inability of DBCC CHECKDB to create the hidden snapshot. In that case it is forced to use locks to stabilize the database, which usually fails because the exclusive database lock required for running the allocation checks portion cannot be acquired.<\/p>\n<p>The first issue is around the permissions of the SQL Server service account. To be able to create the NTFS alternate streams, the service account must have the privileges to create files in the DATA directory of the SQL Server instance. This is a really difficult problem to track down as the actual NTFS failure message is not surfaced by the snapshot creation code.<\/p>\n<p>The second issue is around the use of HP PolyServe. Upgrading to Matrix Server 3.6.1 disables support for alternate streams in the filesystem, effectively breaking DBCC CHECKDB. Here&#8217;s the paragraph from the 3.6.1 upgrade guide (available <a href=\"http:\/\/h20566.www2.hp.com\/hpsc\/doc\/public\/display?docId=emr_na-c01519289\">here<\/a>):<\/p>\n<blockquote><p>In previous releases, MxDB for SQL Server provided ADS support internally for use with various SQL Server features such as the <strong>DBCC CHECKDB <\/strong>command. This internal support has been removed in HP PolyServe Software for Microsoft SQL Server. Instead, after all servers are upgraded to 3.6.1, you will need to enable ADS support on all filesystems previously used with MxDB for SQL Server. During the upgrade to 3.6.1, SQL Server operations requiring ADS will fail, as the new ADS support feature is not yet in place on the nodes running 3.6.1. For continuity of SQL Server operations, it is important to upgrade all nodes to 3.6.1 and upgrade filesystems for ADS as quickly as possible.<\/p><\/blockquote>\n<p>Enabling support after the upgrade means running the PolyServe psfscheck command (which I believe just runs the NTFS fsutil command under the covers), which unfortunately means taking the volume momentarily offline.<\/p>\n<p>Hope this helps!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are a couple of\u00a0issues that I&#8217;ve heard of in the last few weeks\u00a0(one while onsite at a customer) and I think they might bite some people so I&#8217;d like to share them with you. DBCC CHECKDB in 2005 onwards uses a hidden database snapshot to create the transactionally-consistent point-in-time view of the database that [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,31,33,34,53],"tags":[],"class_list":["post-831","post","type-post","status-publish","format-standard","hentry","category-checkdb-from-every-angle","category-database-maintenance","category-database-snapshots","category-dbcc","category-io-subsystems"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Issues around DBCC CHECKDB and the use of hidden database snapshots - 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\/issues-around-dbcc-checkdb-and-the-use-of-hidden-database-snapshots\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Issues around DBCC CHECKDB and the use of hidden database snapshots - Paul S. Randal\" \/>\n<meta property=\"og:description\" content=\"There are a couple of\u00a0issues that I&#8217;ve heard of in the last few weeks\u00a0(one while onsite at a customer) and I think they might bite some people so I&#8217;d like to share them with you. DBCC CHECKDB in 2005 onwards uses a hidden database snapshot to create the transactionally-consistent point-in-time view of the database that [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/paul\/issues-around-dbcc-checkdb-and-the-use-of-hidden-database-snapshots\/\" \/>\n<meta property=\"og:site_name\" content=\"Paul S. Randal\" \/>\n<meta property=\"article:published_time\" content=\"2009-06-15T12:50:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-04-13T16:51:43+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\/issues-around-dbcc-checkdb-and-the-use-of-hidden-database-snapshots\/\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/issues-around-dbcc-checkdb-and-the-use-of-hidden-database-snapshots\/\",\"name\":\"Issues around DBCC CHECKDB and the use of hidden database snapshots - Paul S. Randal\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#website\"},\"datePublished\":\"2009-06-15T12:50:00+00:00\",\"dateModified\":\"2017-04-13T16:51:43+00:00\",\"author\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/issues-around-dbcc-checkdb-and-the-use-of-hidden-database-snapshots\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlskills.com\/blogs\/paul\/issues-around-dbcc-checkdb-and-the-use-of-hidden-database-snapshots\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/issues-around-dbcc-checkdb-and-the-use-of-hidden-database-snapshots\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Issues around DBCC CHECKDB and the use of hidden database snapshots\"}]},{\"@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":"Issues around DBCC CHECKDB and the use of hidden database snapshots - 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\/issues-around-dbcc-checkdb-and-the-use-of-hidden-database-snapshots\/","og_locale":"en_US","og_type":"article","og_title":"Issues around DBCC CHECKDB and the use of hidden database snapshots - Paul S. Randal","og_description":"There are a couple of\u00a0issues that I&#8217;ve heard of in the last few weeks\u00a0(one while onsite at a customer) and I think they might bite some people so I&#8217;d like to share them with you. DBCC CHECKDB in 2005 onwards uses a hidden database snapshot to create the transactionally-consistent point-in-time view of the database that [&hellip;]","og_url":"https:\/\/www.sqlskills.com\/blogs\/paul\/issues-around-dbcc-checkdb-and-the-use-of-hidden-database-snapshots\/","og_site_name":"Paul S. Randal","article_published_time":"2009-06-15T12:50:00+00:00","article_modified_time":"2017-04-13T16:51:43+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\/issues-around-dbcc-checkdb-and-the-use-of-hidden-database-snapshots\/","url":"https:\/\/www.sqlskills.com\/blogs\/paul\/issues-around-dbcc-checkdb-and-the-use-of-hidden-database-snapshots\/","name":"Issues around DBCC CHECKDB and the use of hidden database snapshots - Paul S. Randal","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#website"},"datePublished":"2009-06-15T12:50:00+00:00","dateModified":"2017-04-13T16:51:43+00:00","author":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce"},"breadcrumb":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/issues-around-dbcc-checkdb-and-the-use-of-hidden-database-snapshots\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/paul\/issues-around-dbcc-checkdb-and-the-use-of-hidden-database-snapshots\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/issues-around-dbcc-checkdb-and-the-use-of-hidden-database-snapshots\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/paul\/"},{"@type":"ListItem","position":2,"name":"Issues around DBCC CHECKDB and the use of hidden database snapshots"}]},{"@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\/831","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=831"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts\/831\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/media?parent=831"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/categories?post=831"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/tags?post=831"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}