Database – Informix command to repair database

databaseibminformixsolarissun

We have a Sun Solaris system running Avaya CMS software. The software uses an Informix database. We have a single drive in the server. The drive began to go bad, corrupting files. We sourced a new drive and were able to duplicate the data from the old drive to the new one and successfully get the server up and running. We have a problem left though in that the database reports bad chunks and it will not write new data.

How can we repair this? Is it simply an Informix command to run or do we have to unallocated and re-allocate the database storage?

IBM Informix Dynamic Server Version 9.40.UC4

EDIT: We actually do not care about the old data any longer, it just we want to write new data, but it won't let us. Anyway to fix that?

Best Answer

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 :