SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 Data Corruption Issues
 How Does SQL Add to Corrupted Table After Corrupt?
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

davidshq
Posting Yak Master

USA
119 Posts

Posted - 01/28/2013 :  09:33:32  Show Profile  Visit davidshq's Homepage
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
Flowing Fount of Yak Knowledge

United Kingdom
2076 Posts

Posted - 01/28/2013 :  11:05:14  Show Profile  Visit jackv's Homepage
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

USA
204 Posts

Posted - 01/29/2013 :  06:08:09  Show Profile  Visit prett's Homepage
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.

Edited by - prett on 01/29/2013 23:14:01
Go to Top of Page

russell
Pyro-ma-ni-yak

USA
5072 Posts

Posted - 01/29/2013 :  11:24:34  Show Profile  Visit russell's Homepage
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 - 03/15/2013 :  06:39:34  Show Profile
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 - 05/05/2014 :  00:35:09  Show Profile
Hopefully this will help

unspammed
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000