Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 Data Corruption Issues
 How Does SQL Add to Corrupted Table After Corrupt?

Author  Topic 

davidshq
Posting Yak Master

119 Posts

Posted - 2013-01-28 : 09:33:32
I have a SQL table with millions of rows. It has suffered a corruption which DBCC CHECKDB is unable to repair in any of its many variations. I can view the first several million records, before the corruption hits and a SELECT * FROM table query dies.
What I am wondering is if/how SQL adds additional rows to the table after corruption? Or does it not add additional rows? e.g., now that the corruption has occurred is it adding new rows when requested to the table? If so, is there any way to get all the uncorrupted rows and just drop/truncate the corrupted rows?
Thanks,
Dave

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2013-01-28 : 11:05:14
What exact error message are you getting? What does this give you?DBCC ChecKDB('<my_db>') WITH NO_INFOMSGS, ALL_ERRORMSGS

Do you have a backup?Restore the backup .

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

prett
Posting Yak Master

212 Posts

Posted - 2013-01-29 : 06:08:09
I will suggest you to repair your corrupted tables first before performing any activity on the database. To find the perfect DBCC command, as jackv suggested you first mention the result of this command:
DBCC ChecKDB('<my_db>') WITH NO_INFOMSGS, ALL_ERRORMSGS

This command clearly will show you "where is the exact problem". & then you can use DBCC CHECKDB according to your need.
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2013-01-29 : 11:24:34
No. Do NOT allow DBCC to repair corrupted table(s).

This only DELETES data.

First run the CheckDB as jackv stated, post the results here if u need help interpreting them.
Go to Top of Page

davegeeit
Starting Member

11 Posts

Posted - 2013-03-15 : 06:39:34
Database of MS SQL Server is stored in .MDF file format either on Server or local drive. MDF files get damaged due to slow running of SQL Server, virus codes, accidental deletion of files and other factors. With RecoveryFix for SQL database, you can retrieve user data such as triggers, views, tables, hyperlinks and stored procedures from corrupt MDF files. It recovers SQL database in its original text formatting.

Thanks
Go to Top of Page

elliswhite
Starting Member

36 Posts

Posted - 2014-05-05 : 00:35:09
Hopefully this will help

unspammed
Go to Top of Page
   

- Advertisement -