Re: Informix Online Table Recovery: How?
Posted in 1996
In article <4v8mj2$u6t@netnews.upenn.edu>, John Eichelberger <jon@pathol
ogy.dental.upenn.edu> writes
}Scenario: A user has accidentally removed 20 rows from a table and needs
}to get them back. You are running Informix Online 7.12 with raw partitions
}(not cooked files).
}
}Question: How?
}
}Informix's suggestion was:
}(1) Save your whole db to a tape (I would be using level-0 onarchive).
}(2) Restore an archive that had the 20 rows that were lost.
}(3) Unload the 20 rows.
}(4) Restore the db you just dumped to tape.
}
}There has to be an easier way. Basically, what I am looking for is the
}ability to restore a single table, under a different name if possible.
}
}In Informix-SE with cooked files we would do the following:
}(1) Get a dbschema of the table currently in the database (e.g., realtab).
}(2) Change the name of the table (e.g., faketab) on the dbschema output file.
}(3) Create the table realtab using the dbschema's sql.
}(4) Restore the realtab.dat and realtab.idx file from a backup tape of the
} db to a scratch directory.
}(5) Rename (in a different directory) the realtab.dat and realtab.idx
} to faketab.dat and faketab.idx.
}(6) Move faketab.??? to the db directory and run bcheck on it.
}(7) Extract the data we want from faketab and put into realtab.
}(8) Drop faketab.
}
}So what about Online with raw partitions?
}
}Thanks.
}
}Jon Eichelberger
}P.S. Please don't tell me about something in a future release of Online.
How about using audit trails on tables that you expect that you may have
to
"undelete" in the future?
I understand it may mean a lot of overhead (space and time) but as far
as space is concerned, you can set up a shell script to remove files
older than 1 month or so.
Klean