Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am changing the increment (making it 2 instead of 1) in identity of a column. SQL Server giving me the following error while making change to DB. I searched on internet but some of people saying that this can be a hardware issue but I've tried the same thing on different machine but it is giving me the same error. Following is the error...

Unable to modify table. SQL Server detected a logical consistency-based I/O error: incorrect checksum (expected: 0x0c413292; actual: 0x0c413282). It occurred during a read of page (1:21513) in database ID 7 at offset 0x0000000a812000 in file 'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\TimeCommerceV5.mdf'. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.

share|improve this question

migrated from stackoverflow.com Aug 4 '11 at 1:50

This question came from our site for professional and enthusiast programmers.

    
Hello Andrew, Thanks for response. I've already taken the backup of the DB. May be a good luck. And one more thing to notice is that I've tried this identity increment on the DB which I have got from my client. So, Can we say that DB is already corrupted. If yes, then what is the solution for it? –  Tausif Khan Aug 3 '11 at 15:28

2 Answers 2

Do you have a good backup? It might be time to use it. I doubt this has anything to do with changing the identity increment but rather is caused by trying to copy/write data to/from a bad page. What does DBCC CHECKDB yield? How about:

DBCC PAGE(7, 1, 21513, 3);
share|improve this answer
    
I've run the command you pasted and given this result "DBCC execution completed. If DBCC printed error messages, contact your system administrator." –  Tausif Khan Aug 3 '11 at 15:30
    
Which command? DBCC PAGE or DBCC CHECKDB? See @Andrew's answer for a more complete command to run. You need to include the right database name for CHECKDB. –  Aaron Bertrand Aug 3 '11 at 15:38
    
DBCC PAGE(7, 1, 21513, 3); –  Tausif Khan Aug 3 '11 at 15:46
    
And you're still getting the same error if you try the identity change, that references database ID 7, file 1, page 21513? Or do you get a new page each time? You could try database name instead of 7 but that seems to indicate to me that the page it's complaining about doesn't exist - either because something has changed about the database (table has moved, database has been restored and now has a new ID, etc) or that the error is happening during the re-creation of the table and then is rolled back. –  Aaron Bertrand Aug 3 '11 at 15:49
    
Anyway, regardless of the results, I would say that your C:\ is on its way out and you should think about replacing it or moving your databases to a different machine. A different drive won't help because that's where your O/S is and presumably where SQL Server is installed as well, so it's only a matter of time before the drive really croaks on you. –  Aaron Bertrand Aug 3 '11 at 15:50

(Moved from comments) Voted to move to serverfault, I would believe the error you are being given and your immediate move is to not panic, and backup the database immediately. Then you can start looking a dbcc checkdb and look at what has corrupted.

I can not stress enough that the 'do not panic' and 'backup the database immediately' have to be your next two steps.

Once that has been done, run

DBCC CHECKDB (YOURDBNAME) WITH ALL_ERRORMSGS, NO_INFOMSGS

And come back to us / serverfault with the output, if you are lucky it is just a non-clustered index that has corrupted.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.