Problems with Blob Corruption
Posted in 1999
Topics: Migration, Import/Export & Data Conversion
-- Environment: Online 7.10.UC3
SCO Unix 3.2.4.2
I recently tried to run a dbexport but the export could not complete because
of corruption in a blob. Ran oncheck -cD on the table in question, and
got some revealing information - namely the rowid of the problem page - and
did answer yes to repair. When I checked the database, I found the rowid
still there and still had problems reading the blob, so I deleted the row.
That seemed to work, but after running the oncheck -cD, found yet another
problem rowid. This time I couldn't delete the row.
Anyone know how to recover or remove this data or how to proceed?
Nick Nobbe wrote:
>
> -- Environment: Online 7.10.UC3
> SCO Unix 3.2.4.2
>
> I recently tried to run a dbexport but the export could not complete because
> of corruption in a blob. Ran oncheck -cD on the table in question, and
> got some revealing information - namely the rowid of the problem page - and
> did answer yes to repair. When I checked the database, I found the rowid
> still there and still had problems reading the blob, so I deleted the row.
> That seemed to work, but after running the oncheck -cD, found yet another
> problem rowid. This time I couldn't delete the row.
>
> Anyone know how to recover or remove this data or how to proceed?
The only way I know is to move the data from one table to another or to
unload it to disk using an ESQL program fetching ORDER BY rowid. If
you encounter one of these problem rows close the cursor and reopen one
adding a WHERE rowid > (bad_rowid) and continue copying or unloading
the data skipping the offending row. If you use LOCUSER you can log
the fixed information or save the row with an empty BLOB column since
it is only the BLOB part of the FETCH that fails.
This is the advice that I have received from tech support when I have
encountered this problem. Usually I just drop the table and copy it
from the backup machine or restore the entire instance from the backup
machine's archive. It is easier. If you need an example or LOCUSER,
beyond what it in the ESQL samples directory, look at the source for
myschema.ec in the IIUG Software Repository package I submitted named
utils2_ak or in Jonathan Leffler's sqlcmd utility.
Art S. Kagel