﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 7,2000 / Replication  / How to fix corrupted index on subscriber table / 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 22:57:21 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: How to fix corrupted index on subscriber table</title><link>http://www.sqlservercentral.com/Forums/Topic207648-7-1.aspx</link><description>[quote][b]GilaMonster (3/2/2011)[/b][hr]Please note: 6 year old thread[/quote]7 years now, and still relevant.</description><pubDate>Fri, 13 Jul 2012 11:04:06 GMT</pubDate><dc:creator>spongemagnet</dc:creator></item><item><title>RE: How to fix corrupted index on subscriber table</title><link>http://www.sqlservercentral.com/Forums/Topic207648-7-1.aspx</link><description>Please note: 6 year old thread</description><pubDate>Wed, 02 Mar 2011 12:56:21 GMT</pubDate><dc:creator>GilaMonster</dc:creator></item><item><title>RE: How to fix corrupted index on subscriber table</title><link>http://www.sqlservercentral.com/Forums/Topic207648-7-1.aspx</link><description>Using the DBCC DBREINDEX in a cursor that handles all tables of whatever database resolved the issue for me.  Thanks for the information!  This saved me from having to push a very large database over a very slow connection!</description><pubDate>Wed, 02 Mar 2011 12:52:05 GMT</pubDate><dc:creator>matthew319</dc:creator></item><item><title>RE: How to fix corrupted index on subscriber table</title><link>http://www.sqlservercentral.com/Forums/Topic207648-7-1.aspx</link><description>Thanks.. dbcc dbreindex worked for me...</description><pubDate>Thu, 12 Aug 2010 14:17:54 GMT</pubDate><dc:creator>bmannar</dc:creator></item><item><title>RE: How to fix corrupted index on subscriber table</title><link>http://www.sqlservercentral.com/Forums/Topic207648-7-1.aspx</link><description>&lt;P&gt;FYI, here's what I did:&lt;/P&gt;&lt;P&gt;DBCC DBREINDEX was sufficient to fix the error like the following:&lt;/P&gt;&lt;P&gt;Server: Msg 8951, Level 16, State 1, Line 1Table error: Table 'MSmerge_contents' (ID 1957582012). Missing or invalid key in index 'nc4MSmerge_contents' (ID 4) for the row:Server: Msg 8955, Level 16, State 1, Line 1Data row (1:20154:9) identified by (RID = (1:20154:9) tablenick = 2236004 and rowguid = 55EA2ACD-1475-4F0C-953B-E76A2CBAC33BØ™¨&#x13;&#x10;) has index values (rowguid = 55EA2ACD-1475-4F0C-953B-E76A2CBAC33B`¢¨&#x13;&#x10; and tablenick = 2236004 and rowguid = 55EA2ACD-1475-4F0C-953B-E76A2CBAC33B`¢¨&#x13;&#x10;).&lt;/P&gt;&lt;P&gt;However, to fix error like the following, a DBCC CHECKDB with REPAIR_ALLOW_DATA_LOSS was required:&lt;/P&gt;&lt;P&gt;Server: Msg 8964, Level 16, State 1, Line 1Table error: Object ID 658101385. The text, ntext, or image node at page (3:407121), slot 4, text ID 145881235456 is not referenced.&lt;/P&gt;&lt;P&gt;In fact, after I did the DBCC CHECKDB with REPAIR_ALLOW_DATA_LOSS, and I ran the checkdb again, one index of one table still had error.  I had to redo the DBCC DBREINDEX on that particular index and that fixed the problem.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;baes&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description><pubDate>Mon, 08 Aug 2005 17:06:00 GMT</pubDate><dc:creator>sanny bae</dc:creator></item><item><title>RE: How to fix corrupted index on subscriber table</title><link>http://www.sqlservercentral.com/Forums/Topic207648-7-1.aspx</link><description>&lt;P&gt;Thank you for your postings.&lt;/P&gt;&lt;P&gt;Rookie, I believe DBCC INDEXDEFRAG shuffles and reorganizes the existing pages that the index occupies, while DBCC DBREINDEX rebuild the index table itself.&lt;/P&gt;&lt;P&gt;Hillary, DBCC CHECKALLOC doesn't return any errors.  DBCC CHECKDB returns the following:&lt;/P&gt;&lt;P&gt;...Server: Msg 8964, Level 16, State 1, Line 1Table error: Object ID 658101385. The text, ntext, or image node at page (3:407121), slot 4, text ID 145881235456 is not referenced.Server: Msg 8964, Level 16, State 1, Line 1Table error: Object ID 658101385. The text, ntext, or image node at page (3:407601), slot 12, text ID 146103599104 is not referenced.Server: Msg 8964, Level 16, State 1, Line 1Table error: Object ID 658101385. The text, ntext, or image node at page (3:408496), slot 10, text ID 146519752704 is not referenced.Server: Msg 8986, Level 16, State 1, Line 1Too many errors found (201) for object ID 658101385. To see all error messages rerun the statement using "WITH ALL_ERRORMSGS".Server: Msg 8952, Level 16, State 1, Line 1Table error: Database 'custTrans', index 'MSmerge_contents.nc2MSmerge_contents' (ID 1957582012) (index ID 2). Extra or invalid key for the keys:Server: Msg 8956, Level 16, State 1, Line 1Index row (3:4341892:27) with values (generation = 672333 and tablenick = 2236004 and rowguid = 93D0F4E5-3290-4372-9799-4BB3317E4167`¢¨&#x13;&#x10;) points to the data row identified by ().Server: Msg 8952, Level 16, State 1, Line 1Table error: Database 'custTrans', index 'MSmerge_contents.nc3MSmerge_contents' (ID 1957582012) (index ID 3). Extra or invalid key for the keys:Server: Msg 8956, Level 16, State 1, Line 1Index row (3:869208:101) with values (partchangegen = NULL and tablenick = 2236004 and rowguid = 93D0F4E5-3290-4372-9799-4BB3317E4167`¢¨&#x13;&#x10;) points to the data row identified by ().Server: Msg 8951, Level 16, State 1, Line 1Table error: Table 'MSmerge_contents' (ID 1957582012). Missing or invalid key in index 'nc4MSmerge_contents' (ID 4) for the row:Server: Msg 8955, Level 16, State 1, Line 1Data row (1:20154:9) identified by (RID = (1:20154:9) tablenick = 2236004 and rowguid = 55EA2ACD-1475-4F0C-953B-E76A2CBAC33BØ™¨&#x13;&#x10;) has index values (rowguid = 55EA2ACD-1475-4F0C-953B-E76A2CBAC33B`¢¨&#x13;&#x10; and tablenick = 2236004 and rowguid = 55EA2ACD-1475-4F0C-953B-E76A2CBAC33B`¢¨&#x13;&#x10;).Server: Msg 8952, Level 16, State 1, Line 1Table error: Database 'custTrans', index 'MSmerge_contents.nc4MSmerge_contents' (ID 1957582012) (index ID 4). Extra or invalid key for the keys:Server: Msg 8956, Level 16, State 1, Line 1Index row (1:107517:32) with values (rowguid = 93D0F4E5-3290-4372-9799-4BB3317E4167`¢¨&#x13;&#x10; and tablenick = 2236004 and rowguid = 93D0F4E5-3290-4372-9799-4BB3317E4167`¢¨&#x13;&#x10;) points to the data row identified by ().There are 4988667 rows in 92988 pages for object 'detTrans'.CHECKDB found 0 allocation errors and 244 consistency errors in table 'detTrans' (object ID 658101385).&lt;/P&gt;&lt;P&gt;DBCC results for 'MSmerge_contents'.There are 2978547 rows in 309775 pages for object 'MSmerge_contents'.CHECKDB found 0 allocation errors and 4 consistency errors in table 'MSmerge_contents' (object ID 1957582012).&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;So I was wondering if DBCC DBREINDEX is sufficient to fix the problem, or do I have to run a DBCC CHECKDB with REPAIR_ALLOW_DATA_LOSS?&lt;/P&gt;&lt;P&gt; Thanks,&lt;/P&gt;&lt;P&gt;baes&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description><pubDate>Fri, 05 Aug 2005 07:57:00 GMT</pubDate><dc:creator>sanny bae</dc:creator></item><item><title>RE: How to fix corrupted index on subscriber table</title><link>http://www.sqlservercentral.com/Forums/Topic207648-7-1.aspx</link><description>&lt;P&gt;&lt;FONT face=Arial color=#111111&gt;I've seen this problem somewhat frequently. The solution is to do a &lt;FONT style="BACKGROUND-COLOR: #0a246a" color=#ffffff&gt;DBCC CHECKALLOC&lt;/FONT&gt;     &lt;B&gt;(&lt;/B&gt; &lt;B&gt;'&lt;/B&gt;database_name&lt;/FONT&gt;&lt;FONT face=Arial&gt;&lt;FONT color=#111111&gt;&lt;B&gt;' &lt;/B&gt;&lt;B&gt;,&lt;/B&gt;  REPAIR_ALLOW_DATA_LOSS &lt;/FONT&gt;&lt;B&gt;&lt;FONT color=#111111&gt;)&lt;/FONT&gt;    &lt;/B&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face=Arial&gt;-- Hilary CotterLooking for a SQL Server replication book?&lt;A href="http://www.nwsu.com/0974973602.html"&gt;http://www.nwsu.com/0974973602.html&lt;/A&gt;Looking for a FAQ on Indexing Services/SQL FTS&lt;A href="http://www.indexserverfaq.com"&gt;http://www.indexserverfaq.com&lt;/A&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT face=Arial&gt;&lt;/FONT&gt;&lt;/STRONG&gt; &lt;/P&gt;</description><pubDate>Fri, 05 Aug 2005 04:55:00 GMT</pubDate><dc:creator>Hilary Cotter</dc:creator></item><item><title>RE: How to fix corrupted index on subscriber table</title><link>http://www.sqlservercentral.com/Forums/Topic207648-7-1.aspx</link><description>&lt;P&gt;why don't you try a DBCC IndexDefrag insted of a dbcc dbreindex. it can be done without taking the db or table off-line.&lt;/P&gt;&lt;P&gt;I would shutdown the replication agent.&lt;/P&gt;&lt;P&gt;Run DBCC IndexDefrag &amp;lt;check BOL for the exact syntax &lt;img src='images/emotions/cool.gif' height='20' width='20' border='0' title='Cool' align='absmiddle'&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;Re-start the replication agent.&lt;/P&gt;&lt;P&gt;good luck, &lt;img src='images/emotions/w00t.gif' height='20' width='20' border='0' title='w00t' align='absmiddle'&gt;&lt;/P&gt;</description><pubDate>Fri, 05 Aug 2005 01:55:00 GMT</pubDate><dc:creator>SQL Draggon</dc:creator></item><item><title>How to fix corrupted index on subscriber table</title><link>http://www.sqlservercentral.com/Forums/Topic207648-7-1.aspx</link><description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;My company uses MS Merge Replication in replicating data across different cities.&lt;/P&gt;&lt;P&gt;Here's the merge replication model:Site A: (merge replication) - 4 servers - A1, A2, A3, A4 - A1 is the publisher - A2, A3, A4 subscribe to A1&lt;/P&gt;&lt;P&gt;Site B: (merge replication) - 3 servers - B1, B2, B3 - B1 is the publisher for site B. - B1 also subscribes to A1, in order to get Site A's data. - B2 and B3 subscribe to B1&lt;/P&gt;&lt;P&gt;All servers on Site A and Site B generate data, and the data generated needs to be replicated all over to the other servers.&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;An index of a user table on A2 (first subscriber) is corrupted.  The database size is 20GB, and this corrupted table has over 5 million rows.&lt;/P&gt;&lt;P&gt;The system is live and we can't afford to lose any data.  We also don't have a test system in place where we could test.  This is what I have in mind, can you tell me if this is sufficient to fix the problem?&lt;/P&gt;&lt;P&gt;- Shut down merge agent and SQL server on A2.- Disable merge agent on A1 so it won't write to A2.- Start up SQL server alone on A2.- Make it single user mode for this database.- DBCC DBREINDEX on corrupted table.- Remove single user mode.- Enable merge agent on A1.- Restart SQL server on A2.&lt;/P&gt;&lt;P&gt;Please help.&lt;/P&gt;&lt;P&gt;Thanks in advance,baes&lt;/P&gt;</description><pubDate>Thu, 04 Aug 2005 14:34:00 GMT</pubDate><dc:creator>sanny bae</dc:creator></item></channel></rss>