I had a database in suspect mode (MS SQL 7.0, sp3), that I managed to bring online, but if I try to query more more than 705931 records out of 1295837 in one of the tables, I get this error message:
Server: Msg 823, Level 24, State 1, Line 1 I/O error (bad page ID) detected during read of BUF pointer = 0x14362f80, page ptr = 0x4bb3c000, pageid = (0x1:0xab9f), dbid = 13, status = 0x801, file = E:\mydb_Data.MDF. Connection Broken
Oracle has a trace flag that can automatically skip the bad blocks to allow to recover as much data as possible. Is there such flag in MS SQL?
Hi, Look up dbcc checkdb on books on line. I suggest dbcc checkdb(database, repair_rebuild) with ALL_ERRORMSGS. Also run a dbcc checktable ( tablename ). I know with Torn Page detected on a suspect database you really have no option but to restore the last good backup. In the error you have got try the above commands and see how you get on.
PSS stands for Product Support Services.