homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

Corrupted Table
Big Problems

 2:41 am on Feb 3, 2005 (gmt 0)

(SQL Server 2000, SP3)

We recently moved a DB over from a hard drive we suspected was becoming corrupt. Well, guess what, it was corrupt. We have a backup from right before the move and we have the original MDF files from right before the move. Both of those files have this problem.

We’ve been able to repair all of our tables with dbcc checktable – repair_allow_data_loss except for one. This last table has 1.4 million rows and if you run checktable allowing for data loss, that drops to 158k rows which is unacceptable. The extremely frustrating thing is we have even figured out which rows are causing the problems. We just cannot delete them because we get this message…

Server: Msg 21, Level 24, State 1, Line 1
Warning: Fatal error 823 occurred at Feb 2 2005 9:39PM

Connection Broken

Now I know Level 24 means some serious stuff. However, is there a way to delete rows that are corrupted in this manner?


Zaphod Beeblebrox

 10:03 am on Feb 3, 2005 (gmt 0)

How about creating a new table and copying the correct rows into that?


 2:47 pm on Feb 3, 2005 (gmt 0)

Thank you for the suggestion. You posted that about two minutes after we got done doing it.

We duplicated the schema of the table and wrote a program to copy the '1.39' million rows that weren't corrupted to it then switched the names of the tables. It worked like a charm. Well, a charm that took until 4:00 AM to finish but still a charm.

Zaphod Beeblebrox

 8:33 am on Feb 4, 2005 (gmt 0)


Global Options:
 top home search open messages active posts  

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved