﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Article Discussions / Article Discussions by Author / Discuss content posted by BJ Hermsen  / Recovering data from corrupt tables using non-clustered indexes / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Thu, 23 May 2013 13:02:37 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Recovering data from corrupt tables using non-clustered indexes</title><link>http://www.sqlservercentral.com/Forums/Topic849519-2599-1.aspx</link><description>I like this idea, purely as the very last ditch effort.Good job.</description><pubDate>Tue, 19 Jan 2010 18:48:13 GMT</pubDate><dc:creator>SQLRNNR</dc:creator></item><item><title>RE: Recovering data from corrupt tables using non-clustered indexes</title><link>http://www.sqlservercentral.com/Forums/Topic849519-2599-1.aspx</link><description>Having been there a couple of times over the years, I was glad to see this in writing. Igt is a fact of life, that sometimes you cannot use the backups. For a variety of reasons some places perform their backups knowing that the corruption is there but make the deliberate decesion to not fix it until later. I have done conversions where I have had to peek around the corruption using these methods. Thanks.</description><pubDate>Tue, 19 Jan 2010 15:47:28 GMT</pubDate><dc:creator>sjimmo</dc:creator></item><item><title>RE: Recovering data from corrupt tables using non-clustered indexes</title><link>http://www.sqlservercentral.com/Forums/Topic849519-2599-1.aspx</link><description>[quote][b]Charles Kincaid (1/19/2010)[/b][hr][quote]Clustered Indexes remove the data from the base table and store the data along with the pointer to the row in the table in the Clustered Index.[/quote]  Well you learn something new every day.  I was not aware of this.  Thanks.[/quote]That isn't really a accurate description.  The BOL description in [url=http://msdn.microsoft.com/en-us/library/ms177443.aspx]Clustered Index Structures[/url] is:[quote]In a clustered index, the leaf nodes contain the data pages of the underlying table. The root and intermediate level nodes contain index pages holding index rows. Each index row contains a key value and a pointer to either an intermediate level page in the B-tree, or a data row in the leaf level of the index. The pages in each level of the index are linked in a doubly-linked list. [/quote]The Clustered Index holds the data for the table, there are no pointers back to a rown in the table, it is just a doubly linked list.  That might be what you were going for, but the way you word that makes the concept change slightly.</description><pubDate>Tue, 19 Jan 2010 11:49:11 GMT</pubDate><dc:creator>Jonathan Kehayias</dc:creator></item><item><title>RE: Recovering data from corrupt tables using non-clustered indexes</title><link>http://www.sqlservercentral.com/Forums/Topic849519-2599-1.aspx</link><description>Absolutely not.  I am the first to stand up and say that having and testing backups is of the top priority.  As stated earlier, this is the last ditch effort.  I do not advocate creating extra indexing just in case however knowing ways to pull yourself from the fires of hell can sometimes be helpful.</description><pubDate>Tue, 19 Jan 2010 11:32:15 GMT</pubDate><dc:creator>Robert Hermsen</dc:creator></item><item><title>RE: Recovering data from corrupt tables using non-clustered indexes</title><link>http://www.sqlservercentral.com/Forums/Topic849519-2599-1.aspx</link><description>[quote]Clustered Indexes remove the data from the base table and store the data along with the pointer to the row in the table in the Clustered Index.[/quote]  Well you learn something new every day.  I was not aware of this.  Thanks.:ermm:  Please tell us that you are [b][i][u]not[/u][/i][/b] advocating adding covering indexes to hide database corruption and make folks feel better about less than adequate backups.  Surely not.</description><pubDate>Tue, 19 Jan 2010 11:21:47 GMT</pubDate><dc:creator>Charles Kincaid</dc:creator></item><item><title>RE: Recovering data from corrupt tables using non-clustered indexes</title><link>http://www.sqlservercentral.com/Forums/Topic849519-2599-1.aspx</link><description>Great idea</description><pubDate>Tue, 19 Jan 2010 08:07:05 GMT</pubDate><dc:creator>icata</dc:creator></item><item><title>RE: Recovering data from corrupt tables using non-clustered indexes</title><link>http://www.sqlservercentral.com/Forums/Topic849519-2599-1.aspx</link><description>[quote]The best resolution for database corruption is to restore to the last known good backup.[/quote]I am with you here.[quote]This is unfortunately not always possible.[/quote]But then you immediately lost me here.  To quote Paul Randal "You don't have a backup until you've done a restore."  If you can't restore your database from a backup, you haven't done your job as a DBA.The idea behind your article is great (I'd give you a 4 out of 5), but I think you missed the opportunity to drill it in that backup/restore should be a priority and that the process in your article is nothing more than a last ditch effort to salvage anything possible.  If the table has LOB or BLOB columns, you won't be able to recover those because they can't be indexed with a NCI.  </description><pubDate>Tue, 19 Jan 2010 06:40:44 GMT</pubDate><dc:creator>Jonathan Kehayias</dc:creator></item><item><title>RE: Recovering data from corrupt tables using non-clustered indexes</title><link>http://www.sqlservercentral.com/Forums/Topic849519-2599-1.aspx</link><description>Completely agree with you Jason.  This is that 'Last Ditch Effort' that nobody ever wants to have to resort to.  Becomes the some data is better than no data scenario.</description><pubDate>Tue, 19 Jan 2010 06:39:34 GMT</pubDate><dc:creator>Robert Hermsen</dc:creator></item><item><title>RE: Recovering data from corrupt tables using non-clustered indexes</title><link>http://www.sqlservercentral.com/Forums/Topic849519-2599-1.aspx</link><description>Its important to note that the Non-clustered index DOES NOT contain the data of all columns. The data of all columns (except BLOBs/Text) in a row in SQL Server usually lives in the leaf level pages of the Clustered Index (if there is one). The NC index contains the key value in the covered columns of the NC index, and a uniqueified clustered index key value to locate the clustered index leaf pages, or the File ID+Row ID in the storage heap if there is no clustered index on the table. SQL 2005 and SQL 2008 offer "Included Columns" where the non-key data can be included in the NC index to help reduce navigational costs to get to the clustered index pages, however that is optional. Therefore, while navigation to get to row values using the NC Index is a good technique when you are out of options, it does not guarantee that you will get to the data when the database has corruption.  If the clustered index leaf pages are corrupt, the data is corrupt. If only the intermediate or root page in the clustered index is corrupt, maybe using the NC indexes to get to the rows would work. See also -- NonClustered Index Structures [url=http://msdn.microsoft.com/en-us/library/ms177484.aspx]http://msdn.microsoft.com/en-us/library/ms177484.aspx[/url]-- Clustered Index Structures [url=http://msdn.microsoft.com/en-us/library/ms177443.aspx]http://msdn.microsoft.com/en-us/library/ms177443.aspx[/url]-- Included Columns [url=http://msdn.microsoft.com/en-us/library/ms190806.aspx]http://msdn.microsoft.com/en-us/library/ms190806.aspx[/url]</description><pubDate>Tue, 19 Jan 2010 00:03:08 GMT</pubDate><dc:creator>jasonwhowell</dc:creator></item><item><title>Recovering data from corrupt tables using non-clustered indexes</title><link>http://www.sqlservercentral.com/Forums/Topic849519-2599-1.aspx</link><description>Comments posted to this topic are about the item [B]&lt;A HREF="/articles/Corruption/69096/"&gt;Recovering data from corrupt tables using non-clustered indexes&lt;/A&gt;[/B]</description><pubDate>Mon, 18 Jan 2010 23:20:21 GMT</pubDate><dc:creator>Robert Hermsen</dc:creator></item></channel></rss>