September 18, 2013 at 1:58 pm
I have a table that has inconsistency errors.
There are around 13 million rows of data in it.
1. If I truncate this table and run a dbcc, would the errors disappear?
2. Is there a way I can copy the latest 1 million or half a million rows of data through export data wizard or through select * into?
September 18, 2013 at 2:07 pm
Benki Chendu (9/18/2013)
1. If I truncate this table and run a dbcc, would the errors disappear?
If the errors are only in that table, yes.
2. Is there a way I can copy the latest 1 million or half a million rows of data through export data wizard or through select * into?
Filter by the clustered index key and query in batches. If a query hits the corruption it will fail, so you won't be able to do a select * without a where clause.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
September 18, 2013 at 2:20 pm
Thanks Gail.
Is there a query for the 2nd point?
September 18, 2013 at 2:25 pm
SELECT <column list> FROM <damaged table> WHERE <clustered index key column> BETWEEN <some lower boundary that works> AND <some upper boundary that works>
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy