{"id":4835,"date":"2017-12-01T11:40:49","date_gmt":"2017-12-01T19:40:49","guid":{"rendered":"http:\/\/3.209.169.194\/blogs\/paul\/?p=4835"},"modified":"2017-12-01T11:40:49","modified_gmt":"2017-12-01T19:40:49","slug":"disaster-recovery-101-object-id-0-index-id-1-partition-id-0","status":"publish","type":"post","link":"https:\/\/www.sqlskills.com\/blogs\/paul\/disaster-recovery-101-object-id-0-index-id-1-partition-id-0\/","title":{"rendered":"Disaster recovery 101: Object ID 0, index ID -1, partition ID 0"},"content":{"rendered":"<p>Quite often I see questions about <em>DBCC CHECKDB<\/em> error messages\u00a0along the lines of:<\/p>\n<pre class=\"brush: plain; gutter: false; title: ; toolbar: true; wrap-lines: true; notranslate\" title=\"\">\r\nMsg 8909, Level 16, State 1, Line 2\r\nTable error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 72057594045726720 (type Unknown), page ID (16:1330467) contains an incorrect page ID in its page header. The PageId in the page header = (48:93722876).\r\n<\/pre>\n<p style=\"text-align: justify;\">Specifically, the part that confuses people is <em>&#8220;Object ID 0, index ID -1, partition ID 0&#8221;<\/em>. There isn&#8217;t an object ID of 0 in the system, and how can an index have an ID of -1?<\/p>\n<p>This pattern means that DBCC couldn&#8217;t work out which object the page is part of.<\/p>\n<p style=\"text-align: justify;\">There&#8217;s a data structure I invented when I rewrote <em>DBCC CHECKDB<\/em> for SQL Server 2005 called a <em>DbccCombinedID<\/em>, which encapsulates all the relevant IDs that identify where a page belongs. The default values for object, index, and partition IDs are 0, -1, and 0, respectively. When the page is read by <em>DBCC CHECKDB<\/em>, the <a href=\"https:\/\/www.sqlskills.com\/blogs\/paul\/inside-the-storage-engine-iam-pages-iam-chains-and-allocation-units\/\" target=\"_blank\" rel=\"noopener noreferrer\">allocation unit ID<\/a> is calculated (see <a href=\"https:\/\/www.sqlskills.com\/blogs\/paul\/inside-the-storage-engine-how-are-allocation-unit-ids-calculated\/\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a> for the algorithm) from the <em>m_objId<\/em> and <em>m_indexId<\/em> fields\u00a0in\u00a0the page header, and then <em>DBCC CHECKDB<\/em> does all the metadata look-ups to figure out the other IDs. If the page header is corrupt such that the calculated allocation unit ID isn&#8217;t valid, the other IDs can&#8217;t be populated and the &#8216;owner&#8217; of the page cannot be found. There will likely be other error messages referencing the corrupt page as well.<\/p>\n<p>So what do you do? Follow your usual method for dealing with corruption. See my post\u00a0<a href=\"https:\/\/www.sqlskills.com\/blogs\/paul\/sqlskills-sql101-dealing-with-sql-server-corruption\/\" target=\"_blank\" rel=\"noopener noreferrer\"><em>SQLskills SQL101: Dealing with SQL Server corruption<\/em><\/a> for lots of advice.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Quite often I see questions about DBCC CHECKDB error messages\u00a0along the lines of: Msg 8909, Level 16, State 1, Line 2 Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 72057594045726720 (type Unknown), page ID (16:1330467) contains an incorrect page ID in its page header. The PageId in the page [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30,35],"tags":[],"class_list":["post-4835","post","type-post","status-publish","format-standard","hentry","category-corruption","category-disaster-recovery"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Disaster recovery 101: Object ID 0, index ID -1, partition ID 0 - 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\/disaster-recovery-101-object-id-0-index-id-1-partition-id-0\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Disaster recovery 101: Object ID 0, index ID -1, partition ID 0 - Paul S. Randal\" \/>\n<meta property=\"og:description\" content=\"Quite often I see questions about DBCC CHECKDB error messages\u00a0along the lines of: Msg 8909, Level 16, State 1, Line 2 Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 72057594045726720 (type Unknown), page ID (16:1330467) contains an incorrect page ID in its page header. The PageId in the page [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sqlskills.com\/blogs\/paul\/disaster-recovery-101-object-id-0-index-id-1-partition-id-0\/\" \/>\n<meta property=\"og:site_name\" content=\"Paul S. Randal\" \/>\n<meta property=\"article:published_time\" content=\"2017-12-01T19:40:49+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=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/disaster-recovery-101-object-id-0-index-id-1-partition-id-0\/\",\"url\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/disaster-recovery-101-object-id-0-index-id-1-partition-id-0\/\",\"name\":\"Disaster recovery 101: Object ID 0, index ID -1, partition ID 0 - Paul S. Randal\",\"isPartOf\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#website\"},\"datePublished\":\"2017-12-01T19:40:49+00:00\",\"author\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/disaster-recovery-101-object-id-0-index-id-1-partition-id-0\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.sqlskills.com\/blogs\/paul\/disaster-recovery-101-object-id-0-index-id-1-partition-id-0\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/disaster-recovery-101-object-id-0-index-id-1-partition-id-0\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.sqlskills.com\/blogs\/paul\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Disaster recovery 101: Object ID 0, index ID -1, partition ID 0\"}]},{\"@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":"Disaster recovery 101: Object ID 0, index ID -1, partition ID 0 - 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\/disaster-recovery-101-object-id-0-index-id-1-partition-id-0\/","og_locale":"en_US","og_type":"article","og_title":"Disaster recovery 101: Object ID 0, index ID -1, partition ID 0 - Paul S. Randal","og_description":"Quite often I see questions about DBCC CHECKDB error messages\u00a0along the lines of: Msg 8909, Level 16, State 1, Line 2 Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 72057594045726720 (type Unknown), page ID (16:1330467) contains an incorrect page ID in its page header. The PageId in the page [&hellip;]","og_url":"https:\/\/www.sqlskills.com\/blogs\/paul\/disaster-recovery-101-object-id-0-index-id-1-partition-id-0\/","og_site_name":"Paul S. Randal","article_published_time":"2017-12-01T19:40:49+00:00","author":"Paul Randal","twitter_misc":{"Written by":"Paul Randal","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/disaster-recovery-101-object-id-0-index-id-1-partition-id-0\/","url":"https:\/\/www.sqlskills.com\/blogs\/paul\/disaster-recovery-101-object-id-0-index-id-1-partition-id-0\/","name":"Disaster recovery 101: Object ID 0, index ID -1, partition ID 0 - Paul S. Randal","isPartOf":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#website"},"datePublished":"2017-12-01T19:40:49+00:00","author":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/#\/schema\/person\/ffcec826c18782e1e0adf173826a7fce"},"breadcrumb":{"@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/disaster-recovery-101-object-id-0-index-id-1-partition-id-0\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sqlskills.com\/blogs\/paul\/disaster-recovery-101-object-id-0-index-id-1-partition-id-0\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.sqlskills.com\/blogs\/paul\/disaster-recovery-101-object-id-0-index-id-1-partition-id-0\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sqlskills.com\/blogs\/paul\/"},{"@type":"ListItem","position":2,"name":"Disaster recovery 101: Object ID 0, index ID -1, partition ID 0"}]},{"@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\/4835","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=4835"}],"version-history":[{"count":0,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/posts\/4835\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/media?parent=4835"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/categories?post=4835"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sqlskills.com\/blogs\/paul\/wp-json\/wp\/v2\/tags?post=4835"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}