Is there a Informix command to repair database?

Solution 1:

Simple situations are recoverable with oncheck command.
But your situation and this kind of corruption there is noway how recover the data from the "null" .

For that you need recover your archive + logical log backups.
Then you will recover all data to last status before the crash.

Do you have ? hm.... I'm pretty sure your thinking now is : ooopsss...

This is the minimal which you should have be at an environment without hardware redundancy.

Other option to study after that is configure your database to mirror all chunks at different hard disk... this way if one go bad the other keep all running.

Read this post https://stackoverflow.com/questions/19905391/why-informix-dbexport-is-generating-corrupt-data , maybe it can help you.

EDIT:

If the chunk is corrupted, makes no sense want to write anything over it.
The engine is very limited over this situation to guarantee the integrity of the data.
You will not able to drop the chunk if have some data into it (considering the database still pointing there have something).
The better solution is export what isn't corrupted to text file , recreate your instance from zero, create the database, structures and reload the data...
Need to understand this products are made with resource to guarantee the data integrity not to destroy it (considering the admin configures it properly).
As reference , check this links :

  • Informix Manual 11.70 - Deal with corruption
  • IBM Technotes - Unloading around table corruption
  • IBM Technotes - How to unload rows from a table avoiding inaccessible data using the ROWID