Re: bcheck problems
Posted in 1997
jkormann@castle.net (Joseph Kormann) wrote:
:Hi. We're using SE5.01/UC1. Our new sys-admin was running a bcheck against all
:the tables in our database. He cancelled it then re-ran it later. On the
:second run he got data-corruption all over the place (lost rows, etc)..
:
:Any ideas on:
:
:1) Why the bcheck, on the second run, would cause / report errors in the data.
He may have canceled it while it was fixing something and thereby
corrupted the tables even more. I have however never seen this, but
can imagine that it can happen.
:2) How to fix this without alot of reentry.
1. Restore a backup.
2. Sometimes (*only sometimes*) it is possible to create a new table
with exactly the same columns. Then do:
insert into newtable
select * from oldtable;
This will read the data only and therefor work if the data file is ok
but the index corrupted.
If all goes well you of course drop the old table, rename the new and
create the appropriate indexes.
Nils.Myklebust@idg.no
NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway
My opinions are those of my company
The Informix FAQ is at http://www.iiug.org