February 22, 2005 at 4:18 am
Database has a table called Transactions. If I do a count of the records in the Transactions table (SELECT COUNT(*) FROM Transactions) it counts 76446 records. However, if I do a simple SELECT * FROM Transactions I get the below error.
Server: Msg 8908, Level 22, State 6, Line 1
Table error: Database ID 9, object ID 1140967191, index ID 0. Chain linkage mismatch. (1:21243)->next = (1:21275), but (1:21244)->prev = (1:21243).
Connection Broken
If I try and export out the records to an access database, it errors and only exports 13620 records. Suggesting to me that there are over 62000 bad records in the database. I've done a repair_rebuild but although it then displays all the records in a select query, I'm unable to use ORDER BY and when I try to export the data again, it again errors and only exports 13620 records.
Does anyone have an ideas on how I can fix this problem?
Many Thanks
Steve
Steve Williams
February 22, 2005 at 4:22 am
Hai,
Did you try DBCC CHECKTABLE(Transactions), DBCC CHECKALLOC
What is the error that you get.
Count(*) will be got from sysindexes table itself. So don't confuse with that.
Helen
--------------------------------
Are you a born again. He is Jehova Jirah unto me
February 22, 2005 at 7:40 am
Try re-building your indexes if CHECKTABLE or CHECKALLOC doesn't help.
February 22, 2005 at 9:16 am
Thanks for that. I'll try these
Steve Williams
February 24, 2005 at 11:13 am
I would try a couple of things. Open the table in EM and move to the 13620 row. It's possible that you have injected one or more non-printing characters in the 13621 row that is causing query analyzer to quit when reaching that row.
The other thing I would try doing is use DTS to export the table to a text file and again moving to the 13621 row and see if there are invalid characters anywhere in that row.
March 4, 2005 at 3:37 am
Thanks for that. I've got this working again now. There were two records that contained a reference to a foreign key. These foreign key records had somehow been deleted from their primary table. All I can think is that for a brief amount of time, the indexes on the database had been lost causing them to be able to delete a record without it affecting other dependants records. Anyway, all sorted.
Many thanks again.
Steve
Steve Williams
March 4, 2005 at 4:26 pm
Check your disk also. If you have a bad disk in the array, your index structures could be corrupted. DBCC CHECKDB or other DBCC check commands will help determine if your page structures are corrupted.
March 9, 2005 at 9:54 am
Already done that. All seems OK now. Many thanks for all your advice.
Steve Williams
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply