Re: systables corrupt - help!!!
Posted in 1995
greg@gsesco.DIALix.oz.au (Greg Wake) wrote:
>
>Help. The table systables is corrupt and I can't work out how
>to correct it.
>
>Doing a bcheck produces the same error over and over again.
>"2 missing data record pointers"
>
>What is the easiest way to recreate this table??? I have tried
>unloading the table but it only unloads to the point where the
>corruption is and stops.
>
>The database in question has nearly 1000 tables in it and is running
>on Informix V4.10 SE.
>
>Any help would be greatly appreciated.
>
>Please forward any suggestion via E-Mail. Thankyou.
>
>--
>**********************************************************************
>Greg Wake Geographe Software Engineering
> Bunbury 6230
>greg@gsesco.DIALix.oz.au Western Australia
>
You should have had backups for this situation. Possibly old once.
If you don't the best soulution is of course to make a new database
and move all the datatables to that one using unix cp.
Here is another thing that might work. It's only a last ditch and *not*
i repeat *not* recomended.
1. Make shure you have a good backup of your bad database.
2. Make a new database in a *new* directory.
3. Make two regular tables that has exactly the same fields as
the systables-table (call them my1syst and my2syst).
Remember to include indexes exactly like any on the systables-
table (I don't remember if there are any).
4. In Unix copy the file containing the bad systables table from
the directory of your bad database to the new directory over
the file containing the my1syst-table. You need only copy the
.dat data files.
5. Start dbacces on the *new* database.
6. Do as follows:
insert into my2syst select * from my1syst7. Do a bcheck on my2syst. It should now be ok from bchecks
point of view.
8. There may be some tables missing in my2syst.
Determin if this is the case. Remember to check the system
tables, not only your own once.
The easiest way to check is probably to output to a file
the filename of every table and compare that to a listing
of filenames from your original bad database.
9. Fix any missing information in my2syst, beeing *very*
careful that all information is included properly.
10. Now preferably copy you bad database to a different directory.
11. Copy the file containing the my2syst-tables, the .dat data
file only, so you don't get index problems, over the file
containing the systables-table in the bad database.
12. Run bcheck on the new systables-table and rebuild any
indexes.
If you have done everything exactly correct you *might* have a
working database.
*Do not* update any data in it.
Export the database and do a dbimport into a new database. If this
works you might start checking it out and slowly start using things
in it.
--
Nils.Myklebust@ccmail.telemax.no
NM-data, Dalsbergstien 7, N-0170 Oslo, Norway
My opinions are those of my company