Ann W. Harrison wrote:

I've just worked on a database that had a very peculiar problem - a table disappeared and when you tried to recreate it, the database complained that the table existed. Close examination showed that there was a record in rdb$relations that defined the table, but it was marked as damaged. In fact, it had a bad back pointer, but the record was committed, so the back version was not needed.

What appears to have happened is that someone ran gfix -mend against the database. It found the bad back pointer and marked the record as damaged. InterBase 5.6 (which this was) skips over damaged records. Firebird does too.

The mend option on gfix is dangerous - it can lose data - sometimes lots of data. Use it only if you've got a corruption that prevents a backup and restore and when losing some data is preferable to losing everything.

Immediately after gfix -mend, you should do a backup and restore. Gfix -mend does not leave the database in a reliable multi-user state.

We were able to get the table and all its data back - Paul Beach is a very clever boy - and all is well.

So, look over your maintenance scripts - if you're using the -mend switch thinking it will avoid problems, change it!

Like this post? Share on: TwitterFacebookEmail


Related Articles


Author

Firebird Community

Published

Category

Gems from Firebird Support list

Tags